41 namespace NekMeshUtils
45 "cfi", CADSurfCFI::create,
"CADSurfCFI");
47 void CADSurfCFI::Initialise(
int i, cfi::Face *in,
NekDouble s)
58 cfi::UVBox bx = m_cfiSurface->calcUVBox();
59 b[0] = bx.uLower * m_scal;
60 b[1] = bx.uUpper * m_scal;
61 b[2] = bx.vLower * m_scal;
62 b[3] = bx.vUpper * m_scal;
70 cfi::UVBox bx = m_cfiSurface->calcUVBox();
86 boost::optional<cfi::UVPosition> r = m_cfiSurface->calcUVFromXYZ(px);
94 sqrt((p[0] - p2[0]) * (p[0] - p2[0]) + (p[1] - p2[1]) * (p[1] - p2[1]) +
95 (p[2] - p2[2]) * (p[2] - p2[2])) *
103 cfi::UVPosition uvp(uv[0], uv[1]);
104 cfi::MaxMinCurvaturePair mxp = m_cfiSurface->calcCurvAtUV(uvp);
106 return mxp.maxCurv.curvature * m_scal;
111 cfi::UVPosition uvp(uv[0], uv[1]);
112 cfi::Position
p = m_cfiSurface->calcXYZAtUV(uvp);
114 out[0] = p.x * m_scal;
115 out[1] = p.y * m_scal;
116 out[2] = p.z * m_scal;
123 cfi::UVPosition uvp(uv[0], uv[1]);
124 cfi::Position
p = m_cfiSurface->calcXYZAtUV(uvp);
132 cfi::UVPosition uvp(uv[0], uv[1]);
146 cfi::UVPosition uvp(uv[0], uv[1]);
147 vector<cfi::DerivativeList> *l = m_cfiSurface->calcDerivAtUV(uvp);
149 r[0] = p[0] * m_scal;
150 r[1] = p[1] * m_scal;
151 r[2] = p[2] * m_scal;
152 r[3] = l->at(0).derivatives[0] * m_scal;
153 r[4] = l->at(0).derivatives[1] * m_scal;
154 r[5] = l->at(0).derivatives[2] * m_scal;
155 r[6] = l->at(0).derivatives[3] * m_scal;
156 r[7] = l->at(0).derivatives[4] * m_scal;
157 r[8] = l->at(0).derivatives[5] * m_scal;
165 cfi::UVPosition uvp(uv[0], uv[1]);
166 vector<cfi::DerivativeList> *l = m_cfiSurface->calcDerivAtUV(uvp);
168 r[0] = p[0] * m_scal;
169 r[1] = p[1] * m_scal;
170 r[2] = p[2] * m_scal;
171 r[3] = l->at(0).derivatives[0] * m_scal;
172 r[4] = l->at(0).derivatives[1] * m_scal;
173 r[5] = l->at(0).derivatives[2] * m_scal;
174 r[6] = l->at(0).derivatives[3] * m_scal;
175 r[7] = l->at(0).derivatives[4] * m_scal;
176 r[8] = l->at(0).derivatives[5] * m_scal;
177 r[9] = l->at(1).derivatives[0] * m_scal;
178 r[10] = l->at(1).derivatives[1] * m_scal;
179 r[11] = l->at(1).derivatives[2] * m_scal;
180 r[12] = l->at(1).derivatives[6] * m_scal;
181 r[13] = l->at(1).derivatives[7] * m_scal;
182 r[14] = l->at(1).derivatives[8] * m_scal;
183 r[15] = l->at(1).derivatives[3] * m_scal;
184 r[16] = l->at(1).derivatives[4] * m_scal;
185 r[17] = l->at(1).derivatives[5] * m_scal;
void P(Array< OneD, NekDouble > uv, NekDouble &x, NekDouble &y, NekDouble &z)
CADSurfFactory & GetCADSurfFactory()
tKey RegisterCreatorFunction(tKey idKey, CreatorFunction classCreator, std::string pDesc="")
Register a class with the factory.