46 namespace SpatialDomains
108 int npts = curve->m_points.size();
112 Array<OneD,NekDouble> tmp(npts);
116 cout<<
"edge="<<
id<<endl;
117 std::string err =
"Vertex 0 is separated from first point by more than ";
118 std::stringstream strstrm;
120 err += strstrm.str();
126 cout<<
"edge="<<
id<<endl;
127 std::string err =
"Vertex 1 is separated from last point by more than ";
128 std::stringstream strstrm;
130 err += strstrm.str();
140 for(
int j = 0; j <
npts; ++j)
142 tmp[j] = (curve->m_points[j]->GetPtr())[i];
197 std::list<CompToElmt>::const_iterator def;
224 returnval->m_eid =
m_eid;
230 returnval->m_coordim = 1;
233 vert0->SetGlobalID(vert0->GetVid());
234 returnval->m_verts[0] = vert0;
237 const Array<OneD, const LibUtilities::BasisSharedPtr> base =
m_xmap->GetBase();
239 v.push_back(base[0]->GetPointsKey());
242 const Array<OneD, const NekDouble> jac =
m_geomFactors->GetJac(v);
245 if(jac.num_elements() == 1)
251 Array<OneD, const NekDouble> w0 = base[0]->GetW();
254 for(
int i = 0; i < jac.num_elements(); ++i)
261 vert1->SetGlobalID(vert1->GetVid());
263 returnval->m_verts[1] = vert1;
266 returnval->m_xmap =
m_xmap;
267 returnval->SetUpCoeffs(
m_xmap->GetNcoeffs());
282 const Array<OneD, const NekDouble>& Lcoord)
285 "Geometry is not in physical space");
287 Array<OneD, NekDouble> tmp(
m_xmap->GetTotPoints());
290 return m_xmap->PhysEvaluate(Lcoord, tmp);
306 std::list<CompToElmt>::const_iterator def;
353 std::ostringstream errstrm;
354 errstrm <<
"Connected edges do not share a vertex. Edges ";
371 if(
m_xmap->GetBasisNumModes(0)!=2)
402 const Array<OneD, const NekDouble>& coords,
403 Array<OneD,NekDouble>& Lcoords)
416 Array<OneD, NekDouble> pts(npts);
421 len += (pts[npts-1]-pts[0])*(pts[npts-1]-pts[0]);
422 xi += (coords[i]-pts[0])*(coords[i]-pts[0]);
428 Lcoords[0] = 2*xi/len-1.0;
433 "inverse mapping must be set up to use this call");
443 const Array<OneD, const NekDouble> &gloCoord,
NekDouble tol)
445 Array<OneD,NekDouble> locCoord(
GetCoordim(),0.0);
451 const Array<OneD, const NekDouble>& gloCoord,
452 Array<OneD, NekDouble> &stdCoord,
460 const Array<OneD, const NekDouble>& gloCoord,
461 Array<OneD, NekDouble> &stdCoord,
466 if (stdCoord[0] >= -(1+tol) && stdCoord[0] <= 1+tol)
475 ASSERTL2((i >=0) && (i <= 1),
"Verted id must be between 0 and 1");
498 return m_xmap->GetBasis(i);
514 ASSERTL2((i >=0) && (i <= 1),
"Point id must be between 0 and 1");