54 :
Geometry2D(edges[0]->GetVertex(0)->GetCoordim(), curve)
80 m_coordim = edges[0]->GetVertex(0)->GetCoordim();
93 for (
int i = 0; i <
kNedges; i++)
101 int order0 = std::max(
m_edges[0]->
GetXmap()->GetBasis(0)->GetNumModes(),
103 int order1 = std::max(
m_edges[1]->
GetXmap()->GetBasis(0)->GetNumModes(),
126 return m_xmap->PhysEvaluate(Lcoord, tmp);
147 int i, j, vmap[4] = {-1, -1, -1, -1};
153 for (i = 0; i < 4; ++i)
155 rotPt.
Rotate((*face1[i]), dir, angle);
156 for (j = 0; j < 4; ++j)
158 if (rotPt.
dist(*face2[j]) < tol)
169 NekDouble x, y,
z, x1, y1, z1, cx = 0.0, cy = 0.0, cz = 0.0;
175 for (i = 0; i < 4; ++i)
177 cx += (*face2[i])(0) - (*face1[i])(0);
178 cy += (*face2[i])(1) - (*face1[i])(1);
179 cz += (*face2[i])(2) - (*face1[i])(2);
188 for (i = 0; i < 4; ++i)
193 for (j = 0; j < 4; ++j)
195 x1 = (*face2[j])(0) - cx;
196 y1 = (*face2[j])(1) - cy;
197 z1 = (*face2[j])(2) - cz;
198 if (
sqrt((x1 - x) * (x1 - x) + (y1 - y) * (y1 - y) +
199 (z1 -
z) * (z1 -
z)) < 1e-8)
210 if (vmap[1] == (vmap[0] + 1) % 4)
247 ASSERTL0(
false,
"unable to determine face orientation");
275 if ((
m_xmap->GetBasisNumModes(0) != 2) ||
276 (
m_xmap->GetBasisNumModes(1) != 2))
314 double tmp = std::fabs(norm[0]);
315 if (tmp < fabs(norm[1]))
320 if (tmp < fabs(norm[2]))
332 for (
int i = 0; i <
m_verts.size(); ++i)
335 m_verts[i]->GetCoords(verts[i]);
340 for (
int i = 0; i < 2; i++)
393 int npts =
m_curve->m_points.size();
402 ASSERTL0(nEdgePts * nEdgePts == npts,
403 "NUMPOINTS should be a square number in"
410 "Number of edge points does not correspond to "
411 "number of face points in quadrilateral " +
417 for (j = 0; j < npts; ++j)
419 tmp[j] = (
m_curve->m_points[j]->GetPtr())[i];
424 m_xmap->GetBasis(0)->GetPointsKey(),
425 m_xmap->GetBasis(1)->GetPointsKey(),
442 nEdgeCoeffs =
m_edges[i]->GetXmap()->GetNcoeffs();
446 for (k = 0; k < nEdgeCoeffs; k++)
449 signArray[k] * (
m_edges[i]->GetCoeffs(j))[k];
473 std::vector<NekDouble> c(3);
474 for (
int i = 0; i < 3; ++i)
478 if (fabs(c[1]) >= fabs(c[2]))
515 CurveMap::iterator it = curvedFaces.find(
m_globalID);
517 if (it != curvedFaces.end())
522 for (
int i = 0; i < 4; ++i)
524 m_edges[i]->Reset(curvedEdges, curvedFaces);
535 for (
int i = 0; i < 4; ++i)
#define ASSERTL0(condition, msg)
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode....
Describes the specification for a Basis.
Defines a specification for a set of points.
static std::shared_ptr< DataType > AllocateSharedPtr(const Args &...args)
Allocate a shared pointer from the memory pool.
Array< OneD, int > m_manifold
std::vector< StdRegions::Orientation > m_eorient
void v_CalculateInverseIsoParam() override
bool m_setupState
Wether or not the setup routines have been run.
PointGeomSharedPtr GetVertex(int i) const
Returns vertex i of this object.
GeomState m_state
Enumeration to dictate whether coefficients are filled.
void SetUpCoeffs(const int nCoeffs)
Initialise the Geometry::m_coeffs array.
Array< OneD, Array< OneD, NekDouble > > m_isoParameter
virtual void v_Reset(CurveMap &curvedEdges, CurveMap &curvedFaces)
Reset this geometry object: unset the current state, zero Geometry::m_coeffs and remove allocated Geo...
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.
StdRegions::StdExpansionSharedPtr GetXmap() const
Return the mapping object Geometry::m_xmap that represents the coordinate transformation from standar...
GeomFactorsSharedPtr m_geomFactors
Geometric factors.
int m_coordim
Coordinate dimension of this geometry object.
void Sub(PointGeom &a, PointGeom &b)
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 dist(PointGeom &a)
return distance between this and input a
void v_Reset(CurveMap &curvedEdges, CurveMap &curvedFaces) override
Reset this geometry object: unset the current state, zero Geometry::m_coeffs and remove allocated Geo...
static StdRegions::Orientation GetFaceOrientation(const QuadGeom &face1, const QuadGeom &face2, bool doRot=false, int dir=0, NekDouble angle=0.0, NekDouble tol=1e-8)
Get the orientation of face1.
NekDouble v_GetCoord(const int i, const Array< OneD, const NekDouble > &Lcoord) override
Given local collapsed coordinate Lcoord, return the value of physical coordinate in direction i.
void PreSolveStraightEdge()
void v_GenGeomFactors() override
void v_FillGeom() override
int v_GetDir(const int faceidx, const int facedir) const override
Returns the element coordinate direction corresponding to a given face coordinate direction.
static StdRegions::Orientation GetEdgeOrientation(const SegGeom &edge1, const SegGeom &edge2)
Get the orientation of edge1.
void Interp2D(const BasisKey &fbasis0, const BasisKey &fbasis1, const Array< OneD, const NekDouble > &from, const BasisKey &tbasis0, const BasisKey &tbasis1, Array< OneD, NekDouble > &to)
this function interpolates a 2D function evaluated at the quadrature points of the 2D basis,...
@ beta
Gauss Radau pinned at x=-1,.
@ eGaussLobattoLegendre
1D Gauss-Lobatto-Legendre quadrature points
@ eModified_A
Principle Modified Functions .
static const NekDouble kNekZeroTol
std::vector< PointGeomSharedPtr > PointGeomVector
std::shared_ptr< Curve > CurveSharedPtr
std::unordered_map< int, CurveSharedPtr > CurveMap
GeomType
Indicates the type of element geometry.
@ eRegular
Geometry is straight-sided with constant geometric factors.
@ eDeformed
Geometry is curved or has non-constant factors.
std::shared_ptr< SegGeom > SegGeomSharedPtr
@ ePtsFilled
Geometric information has been generated.
@ eDir1BwdDir2_Dir2BwdDir1
@ eDir1FwdDir1_Dir2FwdDir2
@ eDir1BwdDir1_Dir2BwdDir2
@ eDir1BwdDir2_Dir2FwdDir1
@ eDir1FwdDir1_Dir2BwdDir2
@ eDir1BwdDir1_Dir2FwdDir2
@ eDir1FwdDir2_Dir2FwdDir1
@ eDir1FwdDir2_Dir2BwdDir1
std::vector< double > z(NPUPPER)
std::vector< double > d(NPUPPER *NPUPPER)
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)
scalarT< T > sqrt(scalarT< T > in)