gets an optimum number of curvature sampling points and calculates the curavture at these points
841 totalEnt +=
m_mesh->m_cad->GetNumCurve();
842 for (
int i = 1; i <=
m_mesh->m_cad->GetNumCurve(); i++)
847 "\tCompiling source points");
851 Array<OneD, NekDouble> bds = curve->GetBounds();
853 int samples = ceil(curve->Length(bds[0],bds[1]) /
m_minDelta) * 2;
854 samples = max(40, samples);
855 NekDouble dt = (bds[1] - bds[0]) / (samples + 1);
856 for (
int j = 1; j < samples - 1; j++)
861 Array<OneD, NekDouble>
loc = curve->P(t);
863 vector<pair<CADSurfSharedPtr, CADOrientation::Orientation> > ss =
865 Array<OneD, NekDouble> uv = ss[0].first->locuv(loc);
882 ss[0].first->GetId(), uv,
loc, del);
890 ss[0].first->GetId(), uv,
loc);
899 totalEnt =
m_mesh->m_cad->GetNumSurf();
900 for (
int i = 1; i <= totalEnt; i++)
905 "\tCompiling source points");
909 Array<OneD, NekDouble> bounds = surf->GetBounds();
921 NekDouble du = (bounds[1] - bounds[0]) / (40 - 1);
922 NekDouble dv = (bounds[3] - bounds[2]) / (40 - 1);
927 Array<TwoD, Array<OneD, NekDouble> > samplepoints(40, 40);
929 for (
int j = 0; j < 40; j++)
931 for (
int k = 0; k < 40; k++)
933 Array<OneD, NekDouble> uv(2);
934 uv[0] = k * du + bounds[0];
935 uv[1] = j * dv + bounds[2];
940 samplepoints[k][j] = surf->P(uv);
944 for (
int j = 0; j < 40 - 1; j++)
946 for (
int k = 0; k < 40 - 1; k++)
949 (samplepoints[k][j][0] - samplepoints[k + 1][j][0]) *
950 (samplepoints[k][j][0] - samplepoints[k + 1][j][0]) +
951 (samplepoints[k][j][1] - samplepoints[k + 1][j][1]) *
952 (samplepoints[k][j][1] - samplepoints[k + 1][j][1]) +
953 (samplepoints[k][j][2] - samplepoints[k + 1][j][2]) *
954 (samplepoints[k][j][2] - samplepoints[k + 1][j][2]));
956 (samplepoints[k][j][0] - samplepoints[k][j + 1][0]) *
957 (samplepoints[k][j][0] - samplepoints[k][j + 1][0]) +
958 (samplepoints[k][j][1] - samplepoints[k][j + 1][1]) *
959 (samplepoints[k][j][1] - samplepoints[k][j + 1][1]) +
960 (samplepoints[k][j][2] - samplepoints[k][j + 1][2]) *
961 (samplepoints[k][j][2] - samplepoints[k][j + 1][2]));
977 for (
int j = 0; j < nu; j++)
979 for (
int k = 0; k < nv; k++)
981 Array<OneD, NekDouble> uv(2);
982 uv[0] = (bounds[1] - bounds[0]) / (nu - 1) * j + bounds[0];
983 uv[1] = (bounds[3] - bounds[2]) / (nv - 1) * k + bounds[2];
999 2.0 * (1.0 / C) * sqrt(
m_eps * (2.0 -
m_eps));
1012 surf->GetId(), uv, surf->P(uv), del);
1020 surf->GetId(), uv, surf->P(uv));
1037 cout <<
"\t\tModifying based on refinement lines" << endl;
1040 vector<string> lines;
1042 boost::split(lines,
m_refinement, boost::is_any_of(
":"));
1044 for (
int i = 0; i < lines.size(); i++)
1046 vector<NekDouble> data;
1049 Array<OneD, NekDouble> x1(3), x2(3);
1058 m_lsources.push_back(linesource(x1, x2, data[6], data[7]));
std::shared_ptr< CADSurf > CADSurfSharedPtr
std::vector< SPBaseSharedPtr > m_SPList
list of source points
std::shared_ptr< BPoint > BPointSharedPtr
int PrintProgressbar(const int position, const int goal, const std::string message, int lastprogress=-1)
Prints a progressbar.
NekDouble m_minDelta
minimum delta in the octree
std::shared_ptr< CADCurve > CADCurveSharedPtr
static std::shared_ptr< DataType > AllocateSharedPtr(const Args &...args)
Allocate a shared pointer from the memory pool.
std::shared_ptr< CPoint > CPointSharedPtr
static bool GenerateVector(const std::string &str, std::vector< T > &out)
Takes a comma-separated string and converts it to entries in a vector.
std::vector< linesource > m_lsources
NekDouble m_eps
curavture sensivity paramter
MeshSharedPtr m_mesh
Mesh object.
NekDouble m_maxDelta
maximum delta in the octree