45 namespace NekMeshUtils
52 std::vector<NodeSharedPtr> nodeList;
54 GetCurvedNodes(nodeList);
60 for (
int k = 0; k < nodeList.size(); ++k)
62 s << std::scientific << std::setprecision(8) <<
" "
63 << nodeList[k]->m_x <<
" " << nodeList[k]->m_y <<
" "
64 << nodeList[k]->m_z <<
" ";
73 boost::mutex::scoped_lock lock(io_mutex);
79 p[0] = m_n1->GetGeom(coordDim);
80 p[1] = m_n2->GetGeom(coordDim);
83 if (m_edgeNodes.size() > 0)
89 c->m_points.push_back(p[0]);
90 for (
int i = 0; i < m_edgeNodes.size(); ++i)
92 c->m_points.push_back(m_edgeNodes[i]->GetGeom(coordDim));
94 c->m_points.push_back(p[1]);
97 m_id, coordDim, p, c);
111 int nPoints = order + 1;
120 for (
int i = 0; i < coordDim; ++i)
123 xmap->BwdTrans(geom->GetCoeffs(i), phys[i]);
126 m_edgeNodes.resize(nPoints - 2);
128 for (
int i = 1; i < nPoints - 1; ++i)
131 for (
int j = 0; j < coordDim; ++j)
133 x[j] = xmap->PhysEvaluate(edgePoints + i, phys[j]);
137 boost::shared_ptr<Node>(
new Node(
id++, x[0], x[1], x[2]));
140 m_curveType = edgeType;
147 boost::dynamic_pointer_cast<
CADCurve>(m_parentCAD);
148 for (
int i = 0; i < m_edgeNodes.size(); i++)
151 loc[0] = m_edgeNodes[i]->m_x;
152 loc[1] = m_edgeNodes[i]->m_y;
153 loc[2] = m_edgeNodes[i]->m_z;
155 m_edgeNodes[i]->SetCADCurve(c->GetId(), c, t);
157 m_edgeNodes[i]->m_x = loc[0];
158 m_edgeNodes[i]->m_y = loc[1];
159 m_edgeNodes[i]->m_z = loc[2];
162 std::pair<CADSurfSharedPtr, CADOrientation::Orientation> >
164 for (
int j = 0; j < s.size(); j++)
167 s[j].first->ProjectTo(loc, uv);
168 m_edgeNodes[i]->SetCADSurf(s[j].first->GetId(), s[j].first,
176 boost::dynamic_pointer_cast<
CADSurf>(m_parentCAD);
177 for (
int i = 0; i < m_edgeNodes.size(); i++)
180 loc[0] = m_edgeNodes[i]->m_x;
181 loc[1] = m_edgeNodes[i]->m_y;
182 loc[2] = m_edgeNodes[i]->m_z;
184 s->ProjectTo(loc, uv);
186 m_edgeNodes[i]->m_x = loc[0];
187 m_edgeNodes[i]->m_y = loc[1];
188 m_edgeNodes[i]->m_z = loc[2];
189 m_edgeNodes[i]->SetCADSurf(s->GetId(), s, uv);
NEKMESHUTILS_EXPORT SpatialDomains::SegGeomSharedPtr GetGeom(int coordDim)
Generate a SpatialDomains::SegGeom object for this edge.
base class for CAD curves.
static boost::shared_ptr< DataType > AllocateSharedPtr()
Allocate a shared pointer from the memory pool.
boost::shared_ptr< Curve > CurveSharedPtr
NEKMESHUTILS_EXPORT std::string GetXmlCurveString()
Creates a Nektar++ string listing the coordinates of all the nodes.
boost::shared_ptr< SegGeom > SegGeomSharedPtr
base class for a cad surface
PointsManagerT & PointsManager(void)
Defines a specification for a set of points.
void MakeOrder(int order, SpatialDomains::GeometrySharedPtr geom, LibUtilities::PointsType edgeType, int coordDim, int &id)
Make this edge an order order edge.
boost::shared_ptr< CADSurf > CADSurfSharedPtr
static boost::mutex mutex
boost::shared_ptr< StdExpansion > StdExpansionSharedPtr
boost::shared_ptr< Geometry > GeometrySharedPtr
boost::shared_ptr< PointGeom > PointGeomSharedPtr
boost::shared_ptr< CADCurve > CADCurveSharedPtr