13 #if !defined(KRATOS_NURBS_VOLUME_GEOMETRY_H_INCLUDED )
14 #define KRATOS_NURBS_VOLUME_GEOMETRY_H_INCLUDED
44 template <
class TContainerPo
intType>
51 typedef typename TContainerPointType::value_type
NodeType;
87 :
BaseType(rThisPoints, &msGeometryData)
95 CheckAndFitKnotVectors();
125 :
BaseType(ThisPoints, &msGeometryData)
132 , mPolynomialDegreeU(rOther.mPolynomialDegreeU)
133 , mPolynomialDegreeV(rOther.mPolynomialDegreeV)
134 , mPolynomialDegreeW(rOther.mPolynomialDegreeW)
135 , mKnotsU(rOther.mKnotsU)
136 , mKnotsV(rOther.mKnotsV)
137 , mKnotsW(rOther.mKnotsW)
145 , mPolynomialDegreeU(rOther.mPolynomialDegreeU)
146 , mPolynomialDegreeV(rOther.mPolynomialDegreeV)
147 , mPolynomialDegreeW(rOther.mPolynomialDegreeW)
148 , mKnotsU(rOther.mKnotsU)
149 , mKnotsV(rOther.mKnotsV)
150 , mKnotsW(rOther.mKnotsW)
165 mPolynomialDegreeU = rOther.mPolynomialDegreeU;
166 mPolynomialDegreeV = rOther.mPolynomialDegreeV;
167 mPolynomialDegreeW = rOther.mPolynomialDegreeW;
168 mKnotsU = rOther.mKnotsU;
169 mKnotsV = rOther.mKnotsV;
170 mKnotsW = rOther.mKnotsW;
175 template<
class TOtherContainerPo
intType>
180 mPolynomialDegreeU = rOther.mPolynomialDegreeU;
181 mPolynomialDegreeV = rOther.mPolynomialDegreeV;
182 mPolynomialDegreeW = rOther.mPolynomialDegreeW;
183 mKnotsU = rOther.mKnotsU;
184 mKnotsV = rOther.mKnotsV;
185 mKnotsW = rOther.mKnotsW;
196 return Kratos::make_shared<NurbsVolumeGeometry>(ThisPoints);
206 if (LocalDirectionIndex == 0) {
209 else if (LocalDirectionIndex == 1) {
212 else if (LocalDirectionIndex == 2) {
215 KRATOS_ERROR <<
"Possible direction index in NurbsVolumeGeometry reaches from 0-2. Given direction index: "
216 << LocalDirectionIndex << std::endl;
227 <<
"Trying to access polynomial degree in direction " << LocalDirectionIndex
228 <<
" from NurbsVolumeGeometry #" << this->
Id() <<
". Nurbs volume have only three directions."
231 if (LocalDirectionIndex == 0) {
232 return mPolynomialDegreeU;
234 else if(LocalDirectionIndex == 1){
235 return mPolynomialDegreeV;
238 return mPolynomialDegreeW;
255 this->
Points() = rThisPoints;
263 CheckAndFitKnotVectors();
271 return mPolynomialDegreeU;
279 return mPolynomialDegreeV;
287 return mPolynomialDegreeW;
325 return mKnotsU.size();
333 return mKnotsV.size();
341 return mKnotsW.size();
393 if (DirectionIndex == 0) {
395 if (std::abs(mKnotsU[
i] - mKnotsU[
i + 1]) > 1
e-6) {
400 else if (DirectionIndex == 1) {
402 if (std::abs(mKnotsV[
i] - mKnotsV[
i + 1]) > 1
e-6) {
407 else if (DirectionIndex == 2){
409 if( std::abs(mKnotsW[
i] - mKnotsW[
i+1]) > 1
e-6) {
415 KRATOS_ERROR <<
"NurbsVolumeGeometry::NumberOfKnotSpans: Direction index: "
416 << DirectionIndex <<
" not available. Options are: 0, 1 and 2." << std::endl;
418 return knot_span_counter;
430 if (DirectionIndex == 0) {
431 rSpans[0] = mKnotsU[0];
435 if (std::abs(mKnotsU[
i] - mKnotsU[
i + 1]) > 1
e-6) {
441 else if (DirectionIndex == 1) {
442 rSpans[0] = mKnotsV[0];
446 if (std::abs(mKnotsV[
i] - mKnotsV[
i + 1]) > 1
e-6) {
452 else if (DirectionIndex == 2) {
453 rSpans[0] = mKnotsW[0];
457 if (std::abs(mKnotsW[
i] - mKnotsW[
i + 1]) > 1
e-6) {
463 KRATOS_ERROR <<
"NurbsVolumeGeometry::Spans: Direction index: "
464 << DirectionIndex <<
" not available. Options are: 0, 1 and 2." << std::endl;
475 mKnotsU[mPolynomialDegreeU - 1],
486 mKnotsV[mPolynomialDegreeV - 1],
497 mKnotsW[mPolynomialDegreeW - 1],
507 const SizeType first_span = mPolynomialDegreeU - 1;
510 const SizeType number_of_spans = last_span - first_span + 1;
512 std::vector<NurbsInterval> result(number_of_spans);
515 const double t0 = mKnotsU[first_span +
i];
516 const double t1 = mKnotsU[first_span +
i + 1];
530 const SizeType first_span = mPolynomialDegreeV - 1;
533 const SizeType number_of_spans = last_span - first_span + 1;
535 std::vector<NurbsInterval> result(number_of_spans);
538 const double t0 = mKnotsV[first_span +
i];
539 const double t1 = mKnotsV[first_span +
i + 1];
553 const SizeType first_span = mPolynomialDegreeW - 1;
556 const SizeType number_of_spans = last_span - first_span + 1;
558 std::vector<NurbsInterval> result(number_of_spans);
561 const double t0 = mKnotsW[first_span +
i];
562 const double t1 = mKnotsW[first_span +
i + 1];
599 rIntegrationPoints, points_in_u, points_in_v, points_in_w);
619 const SizeType number_of_integration_points =
620 knot_span_intervals_u.size() * knot_span_intervals_v.size() * knot_span_intervals_w.size()
621 * NumPointsPerSpanU * NumPointsPerSpanV * NumPointsPerSpanW;
623 if (rIntegrationPoints.size() != number_of_integration_points) {
624 rIntegrationPoints.resize(number_of_integration_points);
627 typename IntegrationPointsArrayType::iterator integration_point_iterator = rIntegrationPoints.begin();
629 for (
IndexType i = 0;
i < knot_span_intervals_u.size(); ++
i) {
630 for (
IndexType j = 0;
j < knot_span_intervals_v.size(); ++
j) {
631 for (
IndexType k = 0;
k < knot_span_intervals_w.size(); ++
k) {
633 integration_point_iterator,
634 NumPointsPerSpanU, NumPointsPerSpanV, NumPointsPerSpanW,
635 knot_span_intervals_u[
i].GetT0(), knot_span_intervals_u[
i].GetT1(),
636 knot_span_intervals_v[
j].GetT0(), knot_span_intervals_v[
j].GetT1(),
637 knot_span_intervals_w[
k].GetT0(), knot_span_intervals_w[
k].GetT1());
658 rResult =
ZeroMatrix(working_space_dimension,local_space_dimension);
660 Matrix shape_functions_gradients(points_number, local_space_dimension);
666 rCoordinates[0], rCoordinates[1], rCoordinates[2]);
672 std::vector<int> cp_indices = shape_function_container.
ControlPointIndices(number_cp_u, number_cp_v, number_cp_w);
678 const double value = r_coordinates[
k];
680 rResult(
k,
m) += value * shape_functions_gradients(
i,
m);
703 IndexType NumberOfShapeFunctionDerivatives,
716 NumberOfShapeFunctionDerivatives,
733 IndexType NumberOfShapeFunctionDerivatives,
740 KRATOS_ERROR_IF(NumberOfShapeFunctionDerivatives != 2) <<
"NumberOfShapeFunctionDerivatives must be 2.\n";
743 mPolynomialDegreeU, mPolynomialDegreeV, mPolynomialDegreeW, NumberOfShapeFunctionDerivatives);
746 if (rResultGeometries.
size() != 1){
747 rResultGeometries.
resize(1);
753 const SizeType num_points = rIntegrationPoints.size();
754 KRATOS_ERROR_IF(num_points < 1) <<
"List of integration points is empty.\n";
761 integration_points[0] = rIntegrationPoints;
762 shape_function_gradients[0].resize(rIntegrationPoints.size());
763 shape_function_values[0].resize(rIntegrationPoints.size(), num_nonzero_cps);
765 for(
IndexType i_point = 0; i_point < num_points; ++i_point){
766 shape_function_gradients[0][i_point].resize(num_nonzero_cps, 3);
774 for (
IndexType i_point = 0; i_point < num_points; ++i_point)
777 centroid += rIntegrationPoints[i_point].Coordinates();
780 mKnotsU, mKnotsV, mKnotsW,
781 rIntegrationPoints[i_point][0], rIntegrationPoints[i_point][1], rIntegrationPoints[i_point][2]);
785 shape_function_values[0](i_point,
j) = shape_function_container(
j, 0);
791 shape_function_gradients[0][i_point](
j,
k) = shape_function_container(
j, 1 +
k);
798 centroid /= num_points;
800 mKnotsU, mKnotsV, mKnotsW,
801 centroid[0], centroid[1], centroid[2]);
807 nonzero_control_points(
j) =
pGetPoint(cp_indices[
j]);
812 default_method, integration_points,
813 shape_function_values, shape_function_gradients);
823 mPolynomialDegreeU, mPolynomialDegreeV, mPolynomialDegreeW, NumberOfShapeFunctionDerivatives);
826 if (rResultGeometries.
size() != rIntegrationPoints.size())
827 rResultGeometries.
resize(rIntegrationPoints.size());
835 for (
IndexType i = 0;
i < NumberOfShapeFunctionDerivatives - 1; ++
i) {
836 const IndexType num_derivatives = (2 +
i) * (3 +
i) / 2;
837 shape_function_derivatives[
i].
resize(num_nonzero_cps, num_derivatives);
840 for (
IndexType i = 0;
i < rIntegrationPoints.size(); ++
i)
843 mKnotsU, mKnotsV, mKnotsW, rIntegrationPoints[
i][0], rIntegrationPoints[
i][1], rIntegrationPoints[
i][2]);
851 nonzero_control_points(
j) =
pGetPoint(cp_indices[
j]);
855 N(0,
j) = shape_function_container(
j, 0);
859 if (NumberOfShapeFunctionDerivatives > 0) {
861 for (
IndexType n = 0;
n < NumberOfShapeFunctionDerivatives - 1; ++
n) {
862 const IndexType num_derivatives = (2 +
n) * (3 +
n) / 2;
865 shape_function_derivatives[
n](
j,
k) = shape_function_container(
j, shape_derivative_index +
k);
868 shape_derivative_index += num_derivatives;
873 default_method, rIntegrationPoints[
i],
874 N, shape_function_derivatives);
903 const double Tolerance = std::numeric_limits<double>::epsilon()
907 const CoordinatesArrayType& upper_point = (this->
end()-1)->GetInitialPosition();
916 rProjectedPointLocalCoordinates[0] = ((rPointGlobalCoordinates[0] - lower_point[0]) / std::abs( lower_point[0] - upper_point[0])
917 * std::abs(knots_u[nb_knots_u-1] - knots_u[0])) + knots_u[0];
918 rProjectedPointLocalCoordinates[1] = ((rPointGlobalCoordinates[1] - lower_point[1]) / std::abs( lower_point[1] - upper_point[1])
919 * std::abs(knots_v[nb_knots_v-1] - knots_v[0])) + knots_v[0];
920 rProjectedPointLocalCoordinates[2] = ((rPointGlobalCoordinates[2] - lower_point[2]) / std::abs( lower_point[2] - upper_point[2])
921 * std::abs(knots_w[nb_knots_w-1] - knots_w[0])) + knots_w[0];
944 mKnotsU, mKnotsV, mKnotsW, rLocalCoordinates[0], rLocalCoordinates[1], rLocalCoordinates[2]);
956 cp_index_u, cp_index_v, cp_index_w);
957 rResult += (*this)[index] * shape_function_container(
u,
v,
w, 0);
973 std::vector<CoordinatesArrayType>& rGlobalSpaceDerivatives,
975 const SizeType DerivativeOrder)
const override
977 NurbsVolumeShapeFunction shape_function_container(mPolynomialDegreeU, mPolynomialDegreeV, mPolynomialDegreeW, DerivativeOrder);
986 mKnotsU, mKnotsV, mKnotsW, rLocalCoordinates[0], rLocalCoordinates[1], rLocalCoordinates[2]);
995 ++shape_function_row_i) {
1005 cp_index_u, cp_index_v, cp_index_w);
1007 if (
u == 0 &&
v==0 &&
w==0)
1008 rGlobalSpaceDerivatives[shape_function_row_i] =
1009 (*this)[index] * shape_function_container(
u,
v,
w, shape_function_row_i);
1011 rGlobalSpaceDerivatives[shape_function_row_i] +=
1012 (*this)[index] * shape_function_container(
u,
v,
w, shape_function_row_i);
1042 rCoordinates[0], rCoordinates[1], rCoordinates[2]);
1049 rResult[
i] = shape_function_container(
i, 0);
1074 rCoordinates[0], rCoordinates[1], rCoordinates[2]);
1078 && rResult.size2() != 3)
1082 rResult(
i, 0) = shape_function_container(
i, 1);
1083 rResult(
i, 1) = shape_function_container(
i, 2);
1084 rResult(
i, 2) = shape_function_container(
i, 3);
1116 return "3 dimensional nurbs geometry.";
1127 rOStream <<
"3 dimensional nurbs geometry.";
1139 rOStream <<
"PolynomialDegreeU: " << mPolynomialDegreeU <<
"." << std::endl;
1140 rOStream <<
"PolynomialDegreeV: " << mPolynomialDegreeV <<
"." << std::endl;
1141 rOStream <<
"PolynomialDegreeW: " << mPolynomialDegreeW <<
"." << std::endl;
1142 rOStream <<
"Number of Knots in u-direction: " << mKnotsU.size() <<
"." << std::endl;
1143 rOStream <<
"Number of Knots in v-direction: " << mKnotsV.size() <<
"." << std::endl;
1144 rOStream <<
"Number of Knots in w-direction: " << mKnotsW.size() <<
"." << std::endl;
1178 void CheckAndFitKnotVectors()
1182 if (num_control_points !=
1186 if (num_control_points ==
1191 for (
SizeType i = 0;
i < mKnotsU.size() - 2; ++
i) {
1197 for (
SizeType i = 0;
i < mKnotsV.size() - 2; ++
i) {
1203 for (
SizeType i = 0;
i < mKnotsW.size() - 2; ++
i) {
1210 <<
"Number of controls points and polynomial degrees and number of knots do not match! " << std::endl
1211 <<
" P: " << mPolynomialDegreeU <<
", Q: " << mPolynomialDegreeV <<
", D: " << mPolynomialDegreeW
1212 <<
", number of knots u: " << mKnotsU.size() <<
", number of knots v: " << mKnotsV.size() <<
", number of knots w: " << mKnotsW.size()
1213 <<
", number of control points: " << num_control_points << std::endl
1214 <<
"Following condition must be achieved: ControlPoints.size() = (KnotsU.size() - P + 1) * (KnotsV.size() - Q + 1) * (KnotsW.size() - D + 1)"
1226 void save(
Serializer& rSerializer)
const override
1229 rSerializer.
save(
"PolynomialDegreeU", mPolynomialDegreeU);
1230 rSerializer.
save(
"PolynomialDegreeV", mPolynomialDegreeV);
1231 rSerializer.
save(
"PolynomialDegreeW", mPolynomialDegreeW);
1232 rSerializer.
save(
"KnotsU", mKnotsU);
1233 rSerializer.
save(
"KnotsV", mKnotsV);
1234 rSerializer.
save(
"KnotsW", mKnotsW);
1241 rSerializer.
load(
"PolynomialDegreeU", mPolynomialDegreeU);
1242 rSerializer.
load(
"PolynomialDegreeV", mPolynomialDegreeV);
1243 rSerializer.
load(
"PolynomialDegreeW", mPolynomialDegreeW);
1244 rSerializer.
load(
"KnotsU", mKnotsU);
1245 rSerializer.
load(
"KnotsV", mKnotsV);
1246 rSerializer.
load(
"KnotsW", mKnotsW);
1261 template<
class TPo
intType>
1266 template<
class TPo
intType>
1271 rOStream << std::endl;
1278 template<
class TPo
intType>
1279 const GeometryData NurbsVolumeGeometry<TPointType>::msGeometryData(
1284 template<
class TPo
intType>
static GeometryPointerType CreateQuadraturePoint(SizeType WorkingSpaceDimension, SizeType LocalSpaceDimension, GeometryShapeFunctionContainer< GeometryData::IntegrationMethod > &rShapeFunctionContainer, PointsArrayType rPoints, GeometryType *pGeometryParent)
Definition: quadrature_points_utility.h:159
Definition: geometry_data.h:60
KratosGeometryType
Definition: geometry_data.h:110
KratosGeometryFamily
Definition: geometry_data.h:91
Definition: geometry_dimension.h:42
Geometry base class.
Definition: geometry.h:71
SizeType PointsNumber() const
Definition: geometry.h:528
SizeType size() const
Definition: geometry.h:518
Geometry & operator=(const Geometry &rOther)
Definition: geometry.h:400
std::vector< IntegrationPointType > IntegrationPointsArrayType
Definition: geometry.h:161
SizeType LocalSpaceDimension() const
Definition: geometry.h:1300
std::size_t SizeType
Definition: geometry.h:144
const TPointType::Pointer pGetPoint(const int Index) const
Definition: geometry.h:1790
std::size_t IndexType
Definition: geometry.h:137
IndexType const & Id() const
Id of this Geometry.
Definition: geometry.h:964
iterator begin()
Definition: geometry.h:465
const PointsArrayType & Points() const
Definition: geometry.h:1768
IntegrationMethod GetDefaultIntegrationMethod() const
Definition: geometry.h:2004
iterator end()
Definition: geometry.h:473
const IntegrationPointsArrayType & IntegrationPoints() const
Definition: geometry.h:2284
const ShapeFunctionsGradientsType & ShapeFunctionsLocalGradients() const
Definition: geometry.h:3539
SizeType WorkingSpaceDimension() const
Definition: geometry.h:1287
TPointType const & GetPoint(const int Index) const
Definition: geometry.h:1816
Definition: geometry_shape_function_container.h:60
std::array< Matrix, static_cast< int >IntegrationMethod::NumberOfIntegrationMethods)> ShapeFunctionsValuesContainerType
Shape functions.
Definition: geometry_shape_function_container.h:82
std::array< IntegrationPointsArrayType, static_cast< int >IntegrationMethod::NumberOfIntegrationMethods)> IntegrationPointsContainerType
Definition: geometry_shape_function_container.h:79
std::array< DenseVector< Matrix >, static_cast< int >IntegrationMethod::NumberOfIntegrationMethods)> ShapeFunctionsLocalGradientsContainerType
Definition: geometry_shape_function_container.h:86
Integration information for the creation of integration points.
Definition: integration_info.h:35
QuadratureMethod GetQuadratureMethod(IndexType DimensionIndex) const
Definition: integration_info.h:104
static void IntegrationPoints3D(typename IntegrationPointsArrayType::iterator &rIntegrationPointsBegin, SizeType PointsInU, SizeType PointsInV, SizeType PointsInW, double U0, double U1, double V0, double V1, double W0, double W1)
Definition: integration_point_utilities.cpp:157
void resize(std::size_t NewSize1, std::size_t NewSize2, bool preserve=0)
Definition: amatrix_interface.h:224
Class for optimized use of intervals.
Definition: nurbs_interval.h:36
A volume geometry based on a full 3-dimensional BSpline tensor product.
Definition: nurbs_volume_geometry.h:46
const Vector & KnotsV() const
Get Knot vector in v-direction.
Definition: nurbs_volume_geometry.h:305
NurbsVolumeGeometry(const PointsArrayType &ThisPoints)
Definition: nurbs_volume_geometry.h:124
CoordinatesArrayType & GlobalCoordinates(CoordinatesArrayType &rResult, const CoordinatesArrayType &rLocalCoordinates) const override
This method maps from local space to working space.
Definition: nurbs_volume_geometry.h:930
BaseType::PointsArrayType PointsArrayType
Definition: nurbs_volume_geometry.h:59
std::vector< NurbsInterval > KnotSpanIntervalsW() const
Provides all knot span intervals of the volume in w-direction.
Definition: nurbs_volume_geometry.h:551
KRATOS_CLASS_POINTER_DEFINITION(NurbsVolumeGeometry)
Pointer of NurbsVolumeGeometry.
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: nurbs_volume_geometry.h:1125
BaseType::Pointer Create(PointsArrayType const &ThisPoints) const override
Definition: nurbs_volume_geometry.h:193
NurbsVolumeGeometry(NurbsVolumeGeometry< TContainerPointType > const &rOther)
Copy constructor.
Definition: nurbs_volume_geometry.h:130
SizeType PolynomialDegreeV() const
Definition: nurbs_volume_geometry.h:277
Geometry< NodeType > BaseType
Definition: nurbs_volume_geometry.h:53
GeometryData::KratosGeometryType GetGeometryType() const override
Definition: nurbs_volume_geometry.h:1099
void SetInternals(const PointsArrayType &rThisPoints, const SizeType PolynomialDegreeU, const SizeType PolynomialDegreeV, const SizeType PolynomialDegreeW, const Vector &rKnotsU, const Vector &rKnotsV, const Vector &rKnotsW)
Definition: nurbs_volume_geometry.h:246
void GlobalSpaceDerivatives(std::vector< CoordinatesArrayType > &rGlobalSpaceDerivatives, const CoordinatesArrayType &rLocalCoordinates, const SizeType DerivativeOrder) const override
This method maps from local space to working space and computes the derivatives at the local space pa...
Definition: nurbs_volume_geometry.h:972
SizeType NumberOfControlPointsW() const
Definition: nurbs_volume_geometry.h:381
Matrix & ShapeFunctionsLocalGradients(Matrix &rResult, const CoordinatesArrayType &rCoordinates) const override
Computes the first derivatives in the local parameter space.
Definition: nurbs_volume_geometry.h:1061
std::vector< NurbsInterval > KnotSpanIntervalsU() const
Provides all knot span intervals of the volume in u-direction.
Definition: nurbs_volume_geometry.h:505
SizeType NumberOfControlPointsV() const
Definition: nurbs_volume_geometry.h:373
std::string Info() const override
Turn back information as a string.
Definition: nurbs_volume_geometry.h:1114
NurbsInterval DomainIntervalU() const
Provides the natural boundaries of the NURBS/B-Spline volume.
Definition: nurbs_volume_geometry.h:472
GeometryData::KratosGeometryFamily GetGeometryFamily() const override
Definition: nurbs_volume_geometry.h:1094
const TPointType::Pointer pGetPoint(const int Index) const
Definition: geometry.h:1790
NurbsVolumeGeometry & operator=(const NurbsVolumeGeometry &rOther)
Assignment operator.
Definition: nurbs_volume_geometry.h:162
const Vector & KnotsU() const
Get Knot vector in u-direction.
Definition: nurbs_volume_geometry.h:295
Matrix & Jacobian(Matrix &rResult, const CoordinatesArrayType &rCoordinates) const override
Computes jacobian matrix at the given coordinates.
Definition: nurbs_volume_geometry.h:652
NurbsVolumeGeometry(const PointsArrayType &rThisPoints, const SizeType PolynomialDegreeU, const SizeType PolynomialDegreeV, const SizeType PolynomialDegreeW, const Vector &rKnotsU, const Vector &rKnotsV, const Vector &rKnotsW)
Conctructor for B-Spline volumes.
Definition: nurbs_volume_geometry.h:79
IntegrationInfo GetDefaultIntegrationInfo() const override
Provides the default integration dependent on the polynomial degree of the underlying surface.
Definition: nurbs_volume_geometry.h:575
NurbsVolumeGeometry(NurbsVolumeGeometry< TOtherContainerPointType > const &rOther)
Copy constructor from a geometry with different point type.
Definition: nurbs_volume_geometry.h:142
SizeType NumberOfControlPointsU() const
Attention weights are not yet implemented.
Definition: nurbs_volume_geometry.h:365
TContainerPointType::value_type NodeType
Definition: nurbs_volume_geometry.h:51
void CreateIntegrationPoints(IntegrationPointsArrayType &rIntegrationPoints, SizeType NumPointsPerSpanU, SizeType NumPointsPerSpanV, SizeType NumPointsPerSpanW) const
Creates integration points according to the input parameter.
Definition: nurbs_volume_geometry.h:609
NurbsVolumeGeometry & operator=(NurbsVolumeGeometry< TOtherContainerPointType > const &rOther)
Assignment operator for geometries with different point type.
Definition: nurbs_volume_geometry.h:176
SizeType PolynomialDegreeW() const
Definition: nurbs_volume_geometry.h:285
void CreateQuadraturePointGeometries(GeometriesArrayType &rResultGeometries, IndexType NumberOfShapeFunctionDerivatives, const IntegrationPointsArrayType &rIntegrationPoints, IntegrationInfo &rIntegrationInfo) override
Creates a list of quadrature point geometries. from a list of integration points.
Definition: nurbs_volume_geometry.h:731
SizeType NumberOfKnotsV() const
Definition: nurbs_volume_geometry.h:331
SizeType PointsNumberInDirection(IndexType LocalDirectionIndex) const override
Returns number of points per direction.
Definition: nurbs_volume_geometry.h:204
BaseType::GeometriesArrayType GeometriesArrayType
Definition: nurbs_volume_geometry.h:60
SizeType NumberOfKnotSpans(IndexType DirectionIndex) const
Returns the number of spans in DirectionIndex=0:U, DirectionIndex=1:V and DirectionIndex=2 (which are...
Definition: nurbs_volume_geometry.h:390
std::vector< NurbsInterval > KnotSpanIntervalsV() const
Provides all knot span intervals of the volume in v-direction.
Definition: nurbs_volume_geometry.h:528
bool IsRational() const
Checks if shape functions are rational or not.
Definition: nurbs_volume_geometry.h:348
GeometryShapeFunctionContainer< GeometryData::IntegrationMethod >::ShapeFunctionsLocalGradientsContainerType ShapeFunctionsLocalGradientsContainerType
Definition: nurbs_volume_geometry.h:65
SizeType PolynomialDegreeU() const
Definition: nurbs_volume_geometry.h:269
SizeType NumberOfKnotsU() const
Definition: nurbs_volume_geometry.h:323
BaseType::SizeType SizeType
Definition: nurbs_volume_geometry.h:56
BaseType::CoordinatesArrayType CoordinatesArrayType
Definition: nurbs_volume_geometry.h:58
void CreateIntegrationPoints(IntegrationPointsArrayType &rIntegrationPoints, IntegrationInfo &rIntegrationInfo) const override
Creates integration points according to the polynomial degrees.
Definition: nurbs_volume_geometry.h:590
void PrintData(std::ostream &rOStream) const override
Print geometry's data into given stream.
Definition: nurbs_volume_geometry.h:1137
const Vector & KnotsW() const
Get Knot vector in w-direction.
Definition: nurbs_volume_geometry.h:315
void CreateQuadraturePointGeometries(GeometriesArrayType &rResultGeometries, IndexType NumberOfShapeFunctionDerivatives, IntegrationInfo &rIntegrationInfo) override
Creates a list of quadrature point geometries from a list of integration points.
Definition: nurbs_volume_geometry.h:701
BaseType::IntegrationPointsArrayType IntegrationPointsArrayType
Definition: nurbs_volume_geometry.h:61
BaseType::IndexType IndexType
Definition: nurbs_volume_geometry.h:55
Vector & ShapeFunctionsValues(Vector &rResult, const CoordinatesArrayType &rCoordinates) const override
Computes the shape function values in the local parameter space.
Definition: nurbs_volume_geometry.h:1029
NurbsInterval DomainIntervalW() const
Provides the natural boundaries of the NURBS/B-Spline volume.
Definition: nurbs_volume_geometry.h:494
NurbsInterval DomainIntervalV() const
Provides the natural boundaries of the NURBS/B-Spline volume.
Definition: nurbs_volume_geometry.h:483
GeometryShapeFunctionContainer< GeometryData::IntegrationMethod >::ShapeFunctionsValuesContainerType ShapeFunctionsValuesContainerType
Definition: nurbs_volume_geometry.h:64
void Spans(std::vector< double > &rSpans, IndexType DirectionIndex) const
Provides all knot spans along the given direction.
Definition: nurbs_volume_geometry.h:426
SizeType PolynomialDegree(IndexType LocalDirectionIndex) const override
Return polynomial degree of the volume in direction 0, 1, 2.
Definition: nurbs_volume_geometry.h:224
SizeType NumberOfKnotsW() const
Definition: nurbs_volume_geometry.h:339
~NurbsVolumeGeometry() override=default
Destructor.
GeometryShapeFunctionContainer< GeometryData::IntegrationMethod >::IntegrationPointsContainerType IntegrationPointsContainerType
Definition: nurbs_volume_geometry.h:63
int ProjectionPointGlobalToLocalSpace(const CoordinatesArrayType &rPointGlobalCoordinates, CoordinatesArrayType &rProjectedPointLocalCoordinates, const double Tolerance=std::numeric_limits< double >::epsilon()) const override
Returns local coordinates in return for a point in physical coordinates. This function assumes the in...
Definition: nurbs_volume_geometry.h:900
Definition: nurbs_volume_shape_functions.h:32
void ComputeBSplineShapeFunctionValues(const Vector &rKnotsU, const Vector &rKnotsV, const Vector &rKnotsW, const double ParameterU, const double ParameterV, const double ParameterW)
Computes the shape function values at the given parameter.
Definition: nurbs_volume_shape_functions.h:383
IndexType GetFirstNonzeroControlPointU() const
Definition: nurbs_volume_shape_functions.h:305
IndexType GetFirstNonzeroControlPointW() const
Definition: nurbs_volume_shape_functions.h:325
std::vector< int > ControlPointIndices(SizeType NumberOfControlPointsU, SizeType NumberOfControlPointsV, SizeType NumberOfControlPointsW) const
Definition: nurbs_volume_shape_functions.h:240
static SizeType NumberOfShapeFunctionRows(const SizeType DerivativeOrder)
Returns the number of shape function rows for a given order.
Definition: nurbs_volume_shape_functions.h:72
SizeType NumberOfNonzeroControlPoints() const
Definition: nurbs_volume_shape_functions.h:201
IndexType GetFirstNonzeroControlPointV() const
Definition: nurbs_volume_shape_functions.h:315
PointerVector is a container like stl vector but using a vector to store pointers to its data.
Definition: pointer_vector.h:72
size_type size() const
Definition: pointer_vector.h:255
void resize(size_type dim)
Definition: pointer_vector.h:314
The serialization consists in storing the state of an object into a storage format like data file or ...
Definition: serializer.h:123
void load(std::string const &rTag, TDataType &rObject)
Definition: serializer.h:207
void save(std::string const &rTag, std::array< TDataType, TDataSize > const &rObject)
Definition: serializer.h:545
Short class definition.
Definition: array_1d.h:61
#define KRATOS_SERIALIZE_SAVE_BASE_CLASS(Serializer, BaseType)
Definition: define.h:812
#define KRATOS_SERIALIZE_LOAD_BASE_CLASS(Serializer, BaseType)
Definition: define.h:815
#define KRATOS_ERROR
Definition: exception.h:161
#define KRATOS_ERROR_IF(conditional)
Definition: exception.h:162
#define KRATOS_DEBUG_ERROR_IF(conditional)
Definition: exception.h:171
SizeType GetNumberOfControlPoints(const SizeType PolynomialDegree, const SizeType NumberOfKnots)
Definition: nurbs_utilities.h:99
static constexpr IndexType GetVectorIndexFromMatrixIndices(const SizeType NumberPerRow, const SizeType NumberPerColumn, const IndexType RowIndex, const IndexType ColumnIndex) noexcept
Definition: nurbs_utilities.h:133
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
KratosZeroVector< double > ZeroVector
Definition: amatrix_interface.h:561
Internals::Matrix< double, AMatrix::dynamic, 1 > Vector
Definition: amatrix_interface.h:472
KratosZeroMatrix< double > ZeroMatrix
Definition: amatrix_interface.h:559
std::size_t SizeType
The definition of the size type.
Definition: mortar_classes.h:43
std::istream & operator>>(std::istream &rIStream, LinearMasterSlaveConstraint &rThis)
input stream function
const GeometryData BrepCurve< TContainerPointType, TContainerPointEmbeddedType >::msGeometryData & msGeometryDimension
Definition: brep_curve.h:483
T & noalias(T &TheMatrix)
Definition: amatrix_interface.h:484
std::ostream & operator<<(std::ostream &rOStream, const LinearMasterSlaveConstraint &rThis)
output stream function
Definition: linear_master_slave_constraint.h:432
v
Definition: generate_convection_diffusion_explicit_element.py:114
w
Definition: generate_convection_diffusion_explicit_element.py:108
u
Definition: generate_total_lagrangian_mixed_volumetric_strain_element.py:30
string t0
Definition: kernel_approximation_error.py:61
def load(f)
Definition: ode_solve.py:307
int n
manufactured solution and derivatives (u=0 at z=0 dudz=0 at z=domain_height)
Definition: ode_solve.py:402
int k
Definition: quadrature.py:595
int j
Definition: quadrature.py:648
int m
Definition: run_marine_rain_substepping.py:8
int counter
Definition: script_THERMAL_CORRECT.py:218
N
Definition: sensitivityMatrix.py:29
integer i
Definition: TensorModule.f:17
e
Definition: run_cpp_mpi_tests.py:31