35 #ifndef NEKTAR_SPATIALDOMAINS_GEOMFACTORS_H 36 #define NEKTAR_SPATIALDOMAINS_GEOMFACTORS_H 38 #include <unordered_set> 49 namespace SpatialDomains
59 const GeomFactors &
rhs);
66 typedef std::unordered_set< GeomFactorsSharedPtr >
151 std::map<LibUtilities::PointsKeyVector, Array<OneD, NekDouble> >
154 std::map<LibUtilities::PointsKeyVector, Array<TwoD, NekDouble> >
const Array< TwoD, const NekDouble > GetDerivFactors(const LibUtilities::PointsKeyVector &keyTgt)
Return the derivative of the reference coordinates with respect to the mapping, . ...
std::size_t hash_range(Iter first, Iter last)
std::vector< PointsKey > PointsKeyVector
GeomType m_type
Type of geometry (e.g. eRegular, eDeformed, eMovingRegular).
void ComputePrincipleDirection(const LibUtilities::PointsKeyVector &keyTgt, const SpatialDomains::GeomMMF MMFdir, const Array< OneD, const NekDouble > &CircCentre, Array< OneD, Array< OneD, NekDouble > > &output)
std::shared_ptr< GeomFactors > GeomFactorsSharedPtr
Pointer to a GeomFactors object.
friend bool operator==(const GeomFactors &lhs, const GeomFactors &rhs)
Tests if two GeomFactors classes are equal.
GeomType GetGtype()
Returns whether the geometry is regular or deformed.
Array< TwoD, NekDouble > ComputeDerivFactors(const LibUtilities::PointsKeyVector &keyTgt) const
Return the derivative of the reference coordinates with respect to the mapping, . ...
bool IsValid() const
Determine if element is valid and not self-intersecting.
DerivStorage GetDeriv(const LibUtilities::PointsKeyVector &keyTgt)
Return the derivative of the mapping with respect to the reference coordinates, . ...
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.
size_t GetHash()
Computes a hash of this GeomFactors element.
void hash_combine(std::size_t &seed)
std::unordered_set< GeomFactorsSharedPtr > GeomFactorsSet
An unordered set of GeomFactor pointers.
void CheckIfValid()
Tests if the element is valid and not self-intersecting.
GeomMMF
Principle direction for MMF.
void VectorNormalise(Array< OneD, Array< OneD, NekDouble > > &array)
int GetCoordim() const
Return the number of dimensions of the coordinate system.
int m_coordDim
Dimension of coordinate system.
std::map< LibUtilities::PointsKeyVector, Array< OneD, NekDouble > > m_jacCache
Jacobian vector cache.
~GeomFactors()
Destructor.
const Array< TwoD, const NekDouble > GetGmat(const LibUtilities::PointsKeyVector &keyTgt)
Return the Laplacian coefficients .
std::shared_ptr< StdExpansion > StdExpansionSharedPtr
Array< OneD, Array< OneD, Array< OneD, NekDouble > > > DerivStorage
Storage type for derivative of mapping.
bool m_valid
Validity of element (Jacobian positive)
StdRegions::StdExpansionSharedPtr & GetXmap()
Return the Xmap;.
std::size_t operator()(GeomFactorsSharedPtr const &p) const
std::vector< GeomFactorsSharedPtr > GeomFactorsVector
A vector of GeomFactor pointers.
std::shared_ptr< Geometry > GeometrySharedPtr
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.
enum GeomMMF m_MMFDir
Principle tangent direction for MMF.
const Array< OneD, const NekDouble > GetJac(const LibUtilities::PointsKeyVector &keyTgt)
Return the Jacobian of the mapping and cache the result.
Array< OneD, NekDouble > ComputeJac(const LibUtilities::PointsKeyVector &keyTgt) const
Return the Jacobian of the mapping and cache the result.
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.
DerivStorage ComputeDeriv(const LibUtilities::PointsKeyVector &keyTgt) const
A hash functor for geometric factors. Utilises GeomFactors::GetHash.
int m_expDim
Dimension of expansion.
Calculation and storage of geometric factors associated with the mapping from StdRegions reference el...
GeomFactors(const GeomType gtype, const int coordim, const StdRegions::StdExpansionSharedPtr &xmap, const Array< OneD, Array< OneD, NekDouble > > &coords)
Constructor for GeomFactors class.
bool operator==(const GeomFactors &lhs, const GeomFactors &rhs)
Equivalence test for GeomFactors objects.
Array< TwoD, NekDouble > ComputeGmat(const LibUtilities::PointsKeyVector &keyTgt) const
Computes the Laplacian coefficients .
Array< OneD, Array< OneD, NekDouble > > m_coords
Stores coordinates of the geometry.
void Adjoint(const Array< TwoD, const NekDouble > &src, Array< TwoD, NekDouble > &tgt) const
Compute the transpose of the cofactors matrix.
StandardMatrixTag boost::call_traits< LhsDataType >::const_reference rhs
StdRegions::StdExpansionSharedPtr m_xmap
Stores information about the expansion.
GeomType
Indicates the type of element geometry.
Geometry is curved or has non-constant factors.
void ComputeMovingFrames(const LibUtilities::PointsKeyVector &keyTgt, const SpatialDomains::GeomMMF MMFdir, const Array< OneD, const NekDouble > &CircCentre, Array< OneD, Array< OneD, NekDouble > > &movingframes)
#define SPATIAL_DOMAINS_EXPORT
std::map< LibUtilities::PointsKeyVector, Array< TwoD, NekDouble > > m_derivFactorCache
DerivFactors vector cache.