rath3t / dune-iga

A DUNE grid implementation with NURBS as ansatz functions.
https://rath3t.github.io/dune-iga-doc/
Other
1 stars 1 forks source link

Sanitise nurbsPatchData input #3

Open rath3t opened 1 year ago

rath3t commented 1 year ago

The passed order of control points should be checked and the user should be informed in it is passed wrongly

tarun-mitruka commented 1 year ago
const std::array<int, gridDim> order = {1 ,1};
const std::vector<std::vector<ControlPoint>> controlPoints
    = {{{.p = {0, 0}, .w = 1}, {.p = {0, L}, .w = 1}}, {{.p = {L, 0}, .w = 1}, {.p = {L, L}, .w = 1}}};
auto controlNet = Dune::IGA::NURBSPatchData<gridDim, dimWorld>::ControlPointNetType(dimSize, controlPoints);
patchData = Dune::IGA::degreeElevate(patchData, 0, 1);
patchData = Dune::IGA::degreeElevate(patchData, 1, 1);

const std::vector<std::vector<ControlPoint>> controlPoints
      = {{{.p = {0, 0}, .w = 1}, {.p = {L / 2.0, 0}, .w = 1}, {.p = {L, 0}, .w = 1}},
         {{.p = {0, L / 2.0}, .w = 1}, {.p = {L / 2.0, L / 2.0}, .w = 1}, {.p = {L, L / 2.0}, .w = 1}},
         {{.p = {0, L}, .w = 1}, {.p = {L / 2.0, L}, .w = 1}, {.p = {L, L}, .w = 1}}};
auto controlNet = Dune::IGA::NURBSPatchData<gridDim, dimWorld>::ControlPointNetType(dimSize, controlPoints);
const std::array<int, gridDim> order = {2, 2};

Different node numbering if grid is generated with above set of control points