gets an optimum number of curvature sampling points and calculates the curavture at these points
need to add curvature points with the false tag to make octree modification work
847 for (
int i = 1; i <=
m_cad->GetNumSurf(); i++)
850 Array<OneD, NekDouble> bounds = surf->GetBounds();
863 NekDouble du = (bounds[1] - bounds[0]) / (40 - 1);
864 NekDouble dv = (bounds[3] - bounds[2]) / (40 - 1);
869 Array<TwoD, Array<OneD, NekDouble> > samplepoints(40, 40);
871 for (
int j = 0; j < 40; j++)
873 for (
int k = 0; k < 40; k++)
875 Array<OneD, NekDouble> uv(2);
876 uv[0] = k * du + bounds[0];
877 uv[1] = j * dv + bounds[2];
882 samplepoints[k][j] = surf->P(uv);
886 for (
int j = 0; j < 40 - 1; j++)
888 for (
int k = 0; k < 40 - 1; k++)
891 (samplepoints[k][j][0] - samplepoints[k + 1][j][0]) *
892 (samplepoints[k][j][0] - samplepoints[k + 1][j][0]) +
893 (samplepoints[k][j][1] - samplepoints[k + 1][j][1]) *
894 (samplepoints[k][j][1] - samplepoints[k + 1][j][1]) +
895 (samplepoints[k][j][2] - samplepoints[k + 1][j][2]) *
896 (samplepoints[k][j][2] - samplepoints[k + 1][j][2]));
898 (samplepoints[k][j][0] - samplepoints[k][j + 1][0]) *
899 (samplepoints[k][j][0] - samplepoints[k][j + 1][0]) +
900 (samplepoints[k][j][1] - samplepoints[k][j + 1][1]) *
901 (samplepoints[k][j][1] - samplepoints[k][j + 1][1]) +
902 (samplepoints[k][j][2] - samplepoints[k][j + 1][2]) *
903 (samplepoints[k][j][2] - samplepoints[k][j + 1][2]));
917 for (
int j = 0; j < nu; j++)
919 for (
int k = 0; k < nv; k++)
921 Array<OneD, NekDouble> uv(2);
922 uv[0] = (bounds[1] - bounds[0]) / (nu - 1) * j + bounds[0];
923 uv[1] = (bounds[3] - bounds[2]) / (nv - 1) * k + bounds[2];
938 bool minlimited =
false;
942 2.0 * (1.0 / C) * sqrt(
m_eps * (2.0 -
m_eps));
959 surf->GetId(), uv, surf->P(uv), del, ideal);
967 surf->GetId(), uv, surf->P(uv), del);
976 surf->GetId(), uv, surf->P(uv));
990 vector<linesource> lsources;
998 getline(fle, fileline);
999 stringstream s(fileline);
1007 Array<OneD, NekDouble> x1(3), x2(3);
1009 x1[0] = boost::lexical_cast<
double>(word);
1010 s >> x1[1] >> x1[2] >> x2[0] >> x2[1] >> x2[2] >> r >> d;
1012 lsources.push_back(linesource(x1, x2, r, d));
1016 for (
int j = 0; j < lsources.size(); j++)
1018 cout << lsources[j].x1[0] <<
" " << lsources[j].x1[1] <<
" "
1019 << lsources[j].x1[2] << endl;
1020 cout << lsources[j].x2[0] <<
" " << lsources[j].x2[1] <<
" "
1021 << lsources[j].x2[2] << endl;
1022 cout << lsources[j].Length() << endl;
1026 for (
int i = 0; i <
m_cpList.size(); i++)
1028 for (
int j = 0; j < lsources.size(); j++)
1030 if (lsources[j].withinRange(
m_cpList[i]->GetLoc()))
1033 m_cpList[i]->SetDelta(lsources[j].delta);
CADSystemSharedPtr m_cad
cad object
static boost::shared_ptr< DataType > AllocateSharedPtr()
Allocate a shared pointer from the memory pool.
NekDouble m_minDelta
minimum delta in the octree
boost::shared_ptr< CurvaturePoint > CurvaturePointSharedPtr
boost::shared_ptr< CADSurf > CADSurfSharedPtr
NekDouble m_eps
curavture sensivity paramter
std::vector< CurvaturePointSharedPtr > m_cpList
list of curvature sample points
NekDouble m_maxDelta
maximum delta in the octree