49 namespace GlobalMapping {
72 set<int> updatedVerts, updatedEdges, updatedFaces;
74 dim = graph->GetSpaceDimension();
78 for (i = 0; i < fields[0]->GetExpSize(); ++i)
81 int offset = fields[0]->GetPhys_Offset(i);
82 int nquad = exp->GetTotPoints();
86 for (j = 0; j < dim; ++j)
89 nquad, fields[j]->UpdatePhys() + offset);
96 exp->GetCoords(coord[0], coord[1]);
102 for (j = 0; j < exp->GetNedges(); ++j)
107 if (updatedEdges.find(edge->GetGlobalID()) !=
114 int nEdgePts = exp->GetEdgeNumPoints(j);
125 for (k = 0; k < dim; ++k)
129 exp->GetEdgePhysVals(j, seg, phys [k], edgePhys [k]);
130 exp->GetEdgePhysVals(j, seg, coord[k], edgeCoord[k]);
134 for (k = 0; k < 2; ++k)
136 int id = edge->GetVid(k);
137 if (updatedVerts.find(
id) != updatedVerts.end())
146 (*pt)(0) + edgePhys[0][k*(nEdgePts-1)],
147 (*pt)(1) + edgePhys[1][k*(nEdgePts-1)],
150 updatedVerts.insert(
id);
159 for (k = 0; k < nEdgePts; ++k)
164 dim, edge->GetGlobalID(),
165 edgeCoord[0][k] + edgePhys[0][k],
166 edgeCoord[1][k] + edgePhys[1][k], 0.0);
168 curve->m_points.push_back(vert);
171 curvedEdges[edge->GetGlobalID()] = curve;
172 updatedEdges.insert(edge->GetGlobalID());
177 exp->GetCoords(coord[0], coord[1], coord[2]);
183 for (j = 0; j < exp->GetNfaces(); ++j)
188 if (updatedFaces.find(face->GetGlobalID()) !=
204 "Deformation requires GLL points in both " 205 "directions on a face.");
223 for (k = 0; k < dim; ++k)
227 exp->GetFacePhysVals(
228 j, faceexp, phys [k], tmp, orient);
229 exp->GetFacePhysVals(
230 j, faceexp, coord[k], newPos[k], orient);
232 nq0*nq1, tmp, 1, newPos[k], 1, newPos[k], 1);
237 int nq = max(nq0, nq1);
248 for (k = 0; k < dim; ++k)
252 faceexp->GetPointsKeys()[0],
253 faceexp->GetPointsKeys()[1],
254 newPos[k], edgePts, edgePts, intPos[k]);
257 int edgeOff[2][4][2] = {
272 for (k = 0; k < face->GetNumVerts(); ++k)
275 int id = face->GetVid(k);
279 if (updatedVerts.find(
id) == updatedVerts.end())
284 intPos[0][edgeOff[o][k][0]],
285 intPos[1][edgeOff[o][k][0]],
286 intPos[2][edgeOff[o][k][0]]);
287 updatedVerts.insert(
id);
291 id = face->GetEid(k);
292 if (updatedEdges.find(
id) == updatedEdges.end())
302 const int offset = edgeOff[o][k][0];
303 const int pos = edgeOff[o][k][1];
307 for (l = nq-1; l >= 0; --l)
309 int m = offset + pos*l;
313 dim, edge->GetGlobalID(),
314 intPos[0][m], intPos[1][m],
316 curve->m_points.push_back(vert);
321 for (l = 0; l < nq; ++l)
323 int m = offset + pos*l;
327 dim, edge->GetGlobalID(),
328 intPos[0][m], intPos[1][m],
330 curve->m_points.push_back(vert);
334 curvedEdges[edge->GetGlobalID()] = curve;
335 updatedEdges.insert(edge->GetGlobalID());
366 for (k = 0; k < dim; ++k)
371 faceexp->GetBasis(0)->GetBasisKey(),
372 faceexp->GetBasis(1)->GetBasisKey(),
373 newPos[k], B0, B1, nodal);
383 for (l = 0; l < nq*(nq+1)/2; ++l)
388 dim, face->GetGlobalID(),
389 newPos[0][l], newPos[1][l], newPos[2][l]);
390 curve->m_points.push_back(vert);
395 for (l = 0; l < nq*nq; ++l)
400 dim, face->GetGlobalID(),
401 intPos[0][l], intPos[1][l], intPos[2][l]);
402 curve->m_points.push_back(vert);
406 curvedFaces[face->GetGlobalID()] = curve;
407 updatedFaces.insert(face->GetGlobalID());
413 for (i = 0; i < fields.num_elements(); ++i)
int GetNumPoints() const
Return points order at which basis is defined.
std::shared_ptr< MeshGraph > MeshGraphSharedPtr
std::shared_ptr< Geometry3D > Geometry3DSharedPtr
std::shared_ptr< Geometry2D > Geometry2DSharedPtr
void ModalToNodal(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Geometry2DSharedPtr GetFace(int i) const
Returns face i of this object.
std::unordered_map< int, CurveSharedPtr > CurveMap
General purpose memory allocation routines with the ability to allocate from thread specific memory p...
Principle Modified Functions .
std::shared_ptr< StdExpansion2D > StdExpansion2DSharedPtr
Gauss Radau pinned at x=-1, .
Principle Orthogonal Functions .
Class representing a segment element in reference space.
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...
std::shared_ptr< StdExpansion1D > StdExpansion1DSharedPtr
PointsType GetPointsType() const
Return type of quadrature.
Principle Orthogonal Functions .
Defines a specification for a set of points.
std::shared_ptr< PointGeom > PointGeomSharedPtr
void UpdateGeometry(SpatialDomains::MeshGraphSharedPtr graph, Array< OneD, MultiRegions::ExpListSharedPtr > &fields, bool modal)
Update geometry according to displacement that is in current fields.
std::shared_ptr< Expansion > ExpansionSharedPtr
std::shared_ptr< Curve > CurveSharedPtr
Geometry1DSharedPtr GetEdge(int i) const
Returns edge i of this object.
std::shared_ptr< Geometry1D > Geometry1DSharedPtr
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
Describes the specification for a Basis.
1D Gauss-Lobatto-Legendre quadrature points
void Vadd(int n, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
Add vector z = x+y.
2D Nodal Electrostatic Points on a Triangle
void FwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
This function performs the Forward transformation from physical space to coefficient space...