58 return {bx.uLower, bx.uUpper, bx.vLower, bx.vUpper};
74 std::array<NekDouble, 2> uv;
80 boost::optional<cfi::UVPosition> r =
m_cfiSurface->calcUVFromXYZ(px);
88 sqrt((p[0] - p2[0]) * (p[0] - p2[0]) + (p[1] - p2[1]) * (p[1] - p2[1]) +
89 (p[2] - p2[2]) * (p[2] - p2[2])) *
97 cfi::UVPosition uvp(uv[0], uv[1]);
98 cfi::MaxMinCurvaturePair mxp =
m_cfiSurface->calcCurvAtUV(uvp);
100 return mxp.maxCurv.curvature *
m_scal;
103std::array<NekDoble, 3>
CADSurfCFI::P(std::array<NekDoble, 2> uv)
105 cfi::UVPosition uvp(uv[0], uv[1]);
114 cfi::UVPosition uvp(uv[0], uv[1]);
123 cfi::UVPosition uvp(uv[0], uv[1]);
124 cfi::Direction d =
m_cfiSurface->calcFaceNormalAtUV(uvp);
126 return {d.x, d.y, d.z};
132 cfi::UVPosition uvp(uv[0], uv[1]);
133 vector<cfi::DerivativeList> *l =
m_cfiSurface->calcDerivAtUV(uvp);
134 std::array<NekDouble, 9> r;
138 r[3] = l->at(0).derivatives[0] *
m_scal;
139 r[4] = l->at(0).derivatives[1] *
m_scal;
140 r[5] = l->at(0).derivatives[2] *
m_scal;
141 r[6] = l->at(0).derivatives[3] *
m_scal;
142 r[7] = l->at(0).derivatives[4] *
m_scal;
143 r[8] = l->at(0).derivatives[5] *
m_scal;
151 cfi::UVPosition uvp(uv[0], uv[1]);
152 vector<cfi::DerivativeList> *l =
m_cfiSurface->calcDerivAtUV(uvp);
153 std::array<NekDouble, 18> r;
157 r[3] = l->at(0).derivatives[0] *
m_scal;
158 r[4] = l->at(0).derivatives[1] *
m_scal;
159 r[5] = l->at(0).derivatives[2] *
m_scal;
160 r[6] = l->at(0).derivatives[3] *
m_scal;
161 r[7] = l->at(0).derivatives[4] *
m_scal;
162 r[8] = l->at(0).derivatives[5] *
m_scal;
163 r[9] = l->at(1).derivatives[0] *
m_scal;
164 r[10] = l->at(1).derivatives[1] *
m_scal;
165 r[11] = l->at(1).derivatives[2] *
m_scal;
166 r[12] = l->at(1).derivatives[6] *
m_scal;
167 r[13] = l->at(1).derivatives[7] *
m_scal;
168 r[14] = l->at(1).derivatives[8] *
m_scal;
169 r[15] = l->at(1).derivatives[3] *
m_scal;
170 r[16] = l->at(1).derivatives[4] *
m_scal;
171 r[17] = l->at(1).derivatives[5] *
m_scal;
tKey RegisterCreatorFunction(tKey idKey, CreatorFunction classCreator, std::string pDesc="")
Register a class with the factory.
std::array< NekDouble, 9 > D1(std::array< NekDouble, 2 > uv)
std::array< NekDouble, 4 > GetBounds()
static CADSurfSharedPtr create()
NekDouble Curvature(std::array< NekDouble, 2 > uv)
std::array< NekDouble, 2 > locuv(std::array< NekDouble 3 > p, NekDouble &dist)
std::array< NekDouble, 3 > P(std::array< NekDouble, 2 > uv)
void Initialise(int i, cfi::Face *in, NekDouble s)
std::array< NekDouble, 3 > N(std::array< NekDouble, 2 > uv)
cfi::Face * m_cfiSurface
CFI object for surface.
std::array< NekDouble, 18 > D2(std::array< NekDouble, 2 > uv)
CADSurfFactory & GetCADSurfFactory()
scalarT< T > sqrt(scalarT< T > in)