Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions kratos/geometries/nurbs_surface_geometry.h
Original file line number Diff line number Diff line change
Expand Up @@ -920,7 +920,7 @@ class NurbsSurfaceGeometry : public Geometry<typename TContainerPointType::value
Matrix& rResult,
const CoordinatesArrayType& rCoordinates) const override
{
NurbsSurfaceShapeFunction shape_function_container(mPolynomialDegreeU, mPolynomialDegreeV, 0);
NurbsSurfaceShapeFunction shape_function_container(mPolynomialDegreeU, mPolynomialDegreeV, 1);

if (mIsRational) {
shape_function_container.ComputeNurbsShapeFunctionValues(mKnotsU, mKnotsV, mWeights, rCoordinates[0], rCoordinates[1]);
Expand All @@ -929,13 +929,13 @@ class NurbsSurfaceGeometry : public Geometry<typename TContainerPointType::value
shape_function_container.ComputeBSplineShapeFunctionValues(mKnotsU, mKnotsV, rCoordinates[0], rCoordinates[1]);
}

if (rResult.size1() != 2
&& rResult.size2() != shape_function_container.NumberOfNonzeroControlPoints())
rResult.resize(2, shape_function_container.NumberOfNonzeroControlPoints());
if (rResult.size2() != 2
|| rResult.size1() != shape_function_container.NumberOfNonzeroControlPoints())
rResult.resize(shape_function_container.NumberOfNonzeroControlPoints(), 2);

for (IndexType i = 0; i < shape_function_container.NumberOfNonzeroControlPoints(); i++) {
rResult(0, i) = shape_function_container(i, 1);
rResult(1, i) = shape_function_container(i, 2);
rResult(i, 0) = shape_function_container(i, 1);
rResult(i, 1) = shape_function_container(i, 2);
}

return rResult;
Expand Down
Loading