KratosMultiphysics
KRATOS Multiphysics (Kratos) is a framework for building parallel, multi-disciplinary simulation software, aiming at modularity, extensibility, and high performance. Kratos is written in C++, and counts with an extensive Python interface.
brep_curve_on_surface.h
Go to the documentation of this file.
1 // | / |
2 // ' / __| _` | __| _ \ __|
3 // . \ | ( | | ( |\__ `
4 // _|\_\_| \__,_|\__|\___/ ____/
5 // Multi-Physics
6 //
7 // License: BSD License
8 // Kratos default license: kratos/license.txt
9 //
10 // Main authors: Tobias Teschemacher
11 // Andreas Apostolatos
12 // Pooyan Dadvand
13 // Philipp Bucher
14 //
15 
16 #if !defined(KRATOS_BREP_CURVE_ON_SURFACE_3D_H_INCLUDED )
17 #define KRATOS_BREP_CURVE_ON_SURFACE_3D_H_INCLUDED
18 
19 // System includes
20 
21 // External includes
22 
23 // Project includes
24 #include "geometries/geometry.h"
26 
28 
30 
31 namespace Kratos
32 {
35 
41 template<class TContainerPointType, class TContainerPointEmbeddedType = TContainerPointType>
43  : public Geometry<typename TContainerPointType::value_type>
44 {
45 public:
49 
52 
53  typedef typename TContainerPointType::value_type PointType;
54 
57  typedef typename GeometryType::Pointer GeometryPointer;
58 
60 
63 
65 
66  typedef typename NurbsCurveOnSurfaceType::Pointer NurbsCurveOnSurfacePointerType;
67 
69 
70  typedef typename BaseType::IndexType IndexType;
71  typedef typename BaseType::SizeType SizeType;
72 
76 
78 
82 
85  typename NurbsSurfaceType::Pointer pSurface,
86  typename NurbsCurveType::Pointer pCurve,
87  bool SameCurveDirection = true)
88  : BaseType(PointsArrayType(), &msGeometryData)
89  , mpCurveOnSurface(
91  pSurface, pCurve))
92  , mCurveNurbsInterval(pCurve->DomainInterval())
93  , mSameCurveDirection(SameCurveDirection)
94  {
95  }
96 
99  typename NurbsSurfaceType::Pointer pSurface,
100  typename NurbsCurveType::Pointer pCurve,
101  NurbsInterval CurveNurbsInterval,
102  bool SameCurveDirection = true)
103  : BaseType(PointsArrayType(), &msGeometryData)
104  , mpCurveOnSurface(
106  pSurface, pCurve))
107  , mCurveNurbsInterval(CurveNurbsInterval)
108  , mSameCurveDirection(SameCurveDirection)
109  {
110  }
111 
114  NurbsCurveOnSurfacePointerType pNurbsCurveOnSurface,
115  bool SameCurveDirection = true)
116  : BaseType(PointsArrayType(), &msGeometryData)
117  , mpCurveOnSurface(pNurbsCurveOnSurface)
118  , mCurveNurbsInterval(pNurbsCurveOnSurface->DomainInterval())
119  , mSameCurveDirection(SameCurveDirection)
120  {
121  }
122 
125  NurbsCurveOnSurfacePointerType pNurbsCurveOnSurface,
126  NurbsInterval CurveNurbsInterval,
127  bool SameCurveDirection = true)
128  : BaseType(PointsArrayType(), &msGeometryData)
129  , mpCurveOnSurface(pNurbsCurveOnSurface)
130  , mCurveNurbsInterval(CurveNurbsInterval)
131  , mSameCurveDirection(SameCurveDirection)
132  {
133  }
134 
136  : BaseType(PointsArrayType(), &msGeometryData)
137  {}
138 
139  explicit BrepCurveOnSurface(const PointsArrayType& ThisPoints)
140  : BaseType(ThisPoints, &msGeometryData)
141  {
142  }
143 
146  : BaseType( rOther )
147  , mpCurveOnSurface(rOther.mpCurveOnSurface)
148  , mCurveNurbsInterval(rOther.mCurveNurbsInterval)
149  , mSameCurveDirection(rOther.mSameCurveDirection)
150  {
151  }
152 
154  template<class TOtherContainerPointType, class TOtherContainerPointEmbeddedType>
157  : BaseType( rOther )
158  , mpCurveOnSurface(rOther.mpCurveOnSurface)
159  , mCurveNurbsInterval(rOther.mCurveNurbsInterval)
160  , mSameCurveDirection(rOther.mSameCurveDirection)
161  {
162  }
163 
165  ~BrepCurveOnSurface() override = default;
166 
170 
173  {
174  BaseType::operator=( rOther );
175  mpCurveOnSurface = rOther.mpCurveOnSurface;
176  mCurveNurbsInterval = rOther.mCurveNurbsInterval;
177  mSameCurveDirection = rOther.mSameCurveDirection;
178  return *this;
179  }
180 
182  template<class TOtherContainerPointType, class TOtherContainerPointEmbeddedType>
184  {
185  BaseType::operator=( rOther );
186  mpCurveOnSurface = rOther.mpCurveOnSurface;
187  mCurveNurbsInterval = rOther.mCurveNurbsInterval;
188  mSameCurveDirection = rOther.mSameCurveDirection;
189  return *this;
190  }
191 
195 
196  typename BaseType::Pointer Create( PointsArrayType const& ThisPoints ) const override
197  {
198  return typename BaseType::Pointer( new BrepCurveOnSurface( ThisPoints ) );
199  }
200 
204 
214  {
215  const auto& const_this = *this;
216  return std::const_pointer_cast<GeometryType>(
217  const_this.pGetGeometryPart(Index));
218  }
219 
228  const GeometryPointer pGetGeometryPart(const IndexType Index) const override
229  {
231  return mpCurveOnSurface->pGetGeometryPart(GeometryType::BACKGROUND_GEOMETRY_INDEX);
232 
234  return mpCurveOnSurface;
235 
236  KRATOS_ERROR << "Index " << Index << " not existing in BrepCurveOnSurface: "
237  << this->Id() << std::endl;
238  }
239 
246  bool HasGeometryPart(const IndexType Index) const override
247  {
249  }
250 
254 
255  void Calculate(
256  const Variable<array_1d<double, 3>>& rVariable,
257  array_1d<double, 3>& rOutput
258  ) const override
259  {
260  if (rVariable == PARAMETER_2D_COORDINATES) {
261  mpCurveOnSurface->Calculate(rVariable, rOutput);
262  }
263  }
264 
268 
270  SizeType PolynomialDegree(IndexType LocalDirectionIndex) const override
271  {
272  return mpCurveOnSurface->PolynomialDegree(LocalDirectionIndex);
273  }
274 
278 
279  /* @brief Provides the natural boundaries of the NURBS/B-Spline curve.
280  * @return domain interval.
281  */
283  {
284  return mCurveNurbsInterval;
285  }
286 
287  /*
288  * @brief Indicates if the NURBS-curve is pointing in the same direction
289  * as the B-Rep curve.
290  * @return true -> brep curve and nurbs curve point in same direction.
291  * false -> brep curve and nurbs curve point in opposite directions.
292  */
294  {
295  return mSameCurveDirection;
296  }
297 
300  {
301  return mpCurveOnSurface;
302  }
303 
306  {
307  return mpCurveOnSurface;
308  }
309 
311  SizeType PointsNumberInDirection(IndexType DirectionIndex) const override
312  {
313  return mpCurveOnSurface->PointsNumberInDirection(DirectionIndex);
314  }
315 
319 
320  /* @brief Provides intersections of the nurbs curve with the knots of the surface,
321  * using the interval of this curve.
322  * @param vector of span intervals.
323  * @param index of chosen direction, for curves always 0.
324  */
325  void SpansLocalSpace(std::vector<double>& rSpans, IndexType DirectionIndex = 0) const override
326  {
327  mpCurveOnSurface->SpansLocalSpace(rSpans,
328  mCurveNurbsInterval.GetT0(), mCurveNurbsInterval.GetT1());
329  }
330 
334 
335  /* @brief checks and returns if local coordinate rPointLocalCoordinates[0]
336  * is inside the local/parameter space.
337  * @return on boundary -> 2 - meaning that it is equal to start or end point.
338  * inside -> 1
339  * outside -> 0
340  */
342  const CoordinatesArrayType& rPointLocalCoordinates,
343  const double Tolerance = std::numeric_limits<double>::epsilon()
344  ) const override
345  {
346  const double min_parameter = mCurveNurbsInterval.MinParameter();
347  if (rPointLocalCoordinates[0] < min_parameter) {
348  return 0;
349  } else if (std::abs(rPointLocalCoordinates[0] - min_parameter) < Tolerance) {
350  return 2;
351  }
352 
353  const double max_parameter = mCurveNurbsInterval.MaxParameter();
354  if (rPointLocalCoordinates[0] > max_parameter) {
355  return 0;
356  } else if (std::abs(rPointLocalCoordinates[0] - max_parameter) < Tolerance) {
357  return 2;
358  }
359 
360  return 1;
361  }
362 
366 
367  /* @brief Makes a check if the provided paramater rPointLocalCoordinates[0]
368  * is inside the curve, or on the boundary or if it lays outside.
369  * If it is outside, it is set to the boundary which is closer to it.
370  * @return if rPointLocalCoordinates[0] was before the projection:
371  * inside -> 1
372  * outside -> 0
373  * on boundary -> 2 - meaning that it is equal to start or end point.
374  */
376  const CoordinatesArrayType& rPointLocalCoordinates,
377  CoordinatesArrayType& rClosestPointLocalCoordinates,
378  const double Tolerance = std::numeric_limits<double>::epsilon()
379  ) const override
380  {
381  const double min_parameter = mCurveNurbsInterval.MinParameter();
382  if (rPointLocalCoordinates[0] < min_parameter) {
383  rClosestPointLocalCoordinates[0] = min_parameter;
384  return 0;
385  } else if (std::abs(rPointLocalCoordinates[0] - min_parameter) < Tolerance) {
386  rClosestPointLocalCoordinates[0] = rPointLocalCoordinates[0];
387  return 2;
388  }
389 
390  const double max_parameter = mCurveNurbsInterval.MaxParameter();
391  if (rPointLocalCoordinates[0] > max_parameter) {
392  rClosestPointLocalCoordinates[0] = min_parameter;
393  return 0;
394  } else if (std::abs(rPointLocalCoordinates[0] - max_parameter) < Tolerance) {
395  rClosestPointLocalCoordinates[0] = rPointLocalCoordinates[0];
396  return 2;
397  }
398 
399  rClosestPointLocalCoordinates[0] = rPointLocalCoordinates[0];
400  return 1;
401  }
402 
406 
407  /* @brief Makes projection of rPointGlobalCoordinates to
408  * the closest point on the curve, with
409  * local coordinates rProjectedPointLocalCoordinates.
410  *
411  * @param Tolerance is the breaking criteria.
412  * @return 1 -> projection succeeded
413  * 0 -> projection failed
414  */
416  const CoordinatesArrayType& rPointGlobalCoordinates,
417  CoordinatesArrayType& rProjectedPointLocalCoordinates,
418  const double Tolerance = std::numeric_limits<double>::epsilon()
419  ) const override
420  {
421  CoordinatesArrayType point_global_coordinates;
422 
424  rProjectedPointLocalCoordinates,
425  rPointGlobalCoordinates,
426  point_global_coordinates,
427  *this,
428  20, Tolerance);
429  }
430 
434 
436  Point Center() const override
437  {
438  return mpCurveOnSurface->Center();
439  }
440 
441  /*
442  * @brief This method maps from dimension space to working space.
443  * @param rResult array_1d<double, 3> with the coordinates in working space
444  * @param LocalCoordinates The local coordinates in dimension space
445  * @return array_1d<double, 3> with the coordinates in working space
446  * @see PointLocalCoordinates
447  */
449  CoordinatesArrayType& rResult,
450  const CoordinatesArrayType& rLocalCoordinates
451  ) const override
452  {
453  return mpCurveOnSurface->GlobalCoordinates(rResult, rLocalCoordinates);
454  }
455 
470  std::vector<CoordinatesArrayType>& rGlobalSpaceDerivatives,
471  const CoordinatesArrayType& rLocalCoordinates,
472  const SizeType DerivativeOrder) const override
473  {
474  return mpCurveOnSurface->GlobalSpaceDerivatives(rGlobalSpaceDerivatives, rLocalCoordinates, DerivativeOrder);
475  }
476 
485  bool IsInside(
486  const CoordinatesArrayType& rPoint,
487  CoordinatesArrayType& rResult,
488  const double Tolerance = std::numeric_limits<double>::epsilon()
489  ) const override
490  {
491  KRATOS_ERROR << "IsInside is not yet implemented within the BrepCurveOnSurface";
492  }
493 
497 
499  double Length() const override
500  {
501  IntegrationPointsArrayType integration_points;
502  IntegrationInfo integration_info = GetDefaultIntegrationInfo();
503  CreateIntegrationPoints(integration_points, integration_info);
504 
505  double length = 0.0;
506  for (IndexType i = 0; i < integration_points.size(); ++i) {
507  const double determinant_jacobian = mpCurveOnSurface->DeterminantOfJacobian(integration_points[i]);
508  length += integration_points[i].Weight() * determinant_jacobian;
509  }
510  return length;
511  }
512 
516 
519  {
520  return mpCurveOnSurface->GetDefaultIntegrationInfo();
521  }
522 
526 
527  /* Creates integration points on the nurbs surface of this geometry.
528  * @param return integration points.
529  */
531  IntegrationPointsArrayType& rIntegrationPoints,
532  IntegrationInfo& rIntegrationInfo) const override
533  {
534  std::vector<double> spans;
535  SpansLocalSpace(spans);
536 
538  rIntegrationPoints, spans, rIntegrationInfo);
539  }
540 
544 
545  /* @brief creates a list of quadrature point geometries
546  * from a list of integration points on the
547  * curve on surface of this geometry.
548  *
549  * @param rResultGeometries list of quadrature point geometries.
550  * @param rIntegrationPoints list of provided integration points.
551  * @param NumberOfShapeFunctionDerivatives the number of evaluated
552  * derivatives of shape functions at the quadrature point geometries.
553  *
554  * @see quadrature_point_geometry.h
555  */
557  GeometriesArrayType& rResultGeometries,
558  IndexType NumberOfShapeFunctionDerivatives,
559  const IntegrationPointsArrayType& rIntegrationPoints,
560  IntegrationInfo& rIntegrationInfo) override
561  {
562  mpCurveOnSurface->CreateQuadraturePointGeometries(
563  rResultGeometries, NumberOfShapeFunctionDerivatives, rIntegrationPoints, rIntegrationInfo);
564 
565  for (IndexType i = 0; i < rResultGeometries.size(); ++i) {
566  rResultGeometries(i)->SetGeometryParent(this);
567  }
568  }
569 
573 
575  Vector &rResult,
576  const CoordinatesArrayType& rCoordinates) const override
577  {
578  return mpCurveOnSurface->ShapeFunctionsValues(rResult, rCoordinates);
579  }
580 
582  Matrix& rResult,
583  const CoordinatesArrayType& rCoordinates) const override
584  {
585  return mpCurveOnSurface->ShapeFunctionsLocalGradients(rResult, rCoordinates);
586  }
587 
591 
593  {
595  }
596 
598  {
600  }
601 
605 
607  std::string Info() const override
608  {
609  return "Brep face curve";
610  }
611 
613  void PrintInfo( std::ostream& rOStream ) const override
614  {
615  rOStream << "Brep face curve";
616  }
617 
619  void PrintData( std::ostream& rOStream ) const override
620  {
621  BaseType::PrintData( rOStream );
622  std::cout << std::endl;
623  rOStream << " Brep face curve : " << std::endl;
624  }
625 
627 
628 private:
631 
632  static const GeometryData msGeometryData;
633 
634  static const GeometryDimension msGeometryDimension;
635 
639 
640  NurbsCurveOnSurfacePointerType mpCurveOnSurface;
641 
642  NurbsInterval mCurveNurbsInterval;
643 
646  bool mSameCurveDirection;
647 
651 
652  friend class Serializer;
653 
654  void save( Serializer& rSerializer ) const override
655  {
657  rSerializer.save("CurveOnSurface", mpCurveOnSurface);
658  rSerializer.save("NurbsInterval", mCurveNurbsInterval);
659  rSerializer.save("SameCurveDirection", mSameCurveDirection);
660  }
661 
662  void load( Serializer& rSerializer ) override
663  {
665  rSerializer.load("CurveOnSurface", mpCurveOnSurface);
666  rSerializer.load("NurbsInterval", mCurveNurbsInterval);
667  rSerializer.load("SameCurveDirection", mSameCurveDirection);
668  }
669 
671 }; // Class BrepCurveOnSurface
672 
675 
677 template<class TContainerPointType, class TContainerPointEmbeddedType = TContainerPointType> inline std::istream& operator >> (
678  std::istream& rIStream,
680 
682 template<class TContainerPointType, class TContainerPointEmbeddedType = TContainerPointType> inline std::ostream& operator << (
683  std::ostream& rOStream,
685 {
686  rThis.PrintInfo( rOStream );
687  rOStream << std::endl;
688  rThis.PrintData( rOStream );
689  return rOStream;
690 }
691 
695 
696 template<class TContainerPointType, class TContainerPointEmbeddedType> const
697 GeometryData BrepCurveOnSurface<TContainerPointType, TContainerPointEmbeddedType>::msGeometryData(
700  {}, {}, {});
701 
702 template<class TContainerPointType, class TContainerPointEmbeddedType>
704 
706 }// namespace Kratos.
707 
708 #endif // KRATOS_BREP_CURVE_ON_SURFACE_3D_H_INCLUDED defined
The BrepCurveOnSurface acts as topology for curves on surfaces.
Definition: brep_curve_on_surface.h:44
BaseType::IndexType IndexType
Definition: brep_curve_on_surface.h:70
Vector & ShapeFunctionsValues(Vector &rResult, const CoordinatesArrayType &rCoordinates) const override
Definition: brep_curve_on_surface.h:574
KRATOS_CLASS_POINTER_DEFINITION(BrepCurveOnSurface)
virtual int ClosestPointLocalToLocalSpace(const CoordinatesArrayType &rPointLocalCoordinates, CoordinatesArrayType &rClosestPointLocalCoordinates, const double Tolerance=std::numeric_limits< double >::epsilon()) const override
Calculates the closes point projection This method calculates the closest point projection of a point...
Definition: brep_curve_on_surface.h:375
BaseType::SizeType SizeType
Definition: brep_curve_on_surface.h:71
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: brep_curve_on_surface.h:613
~BrepCurveOnSurface() override=default
Destructor.
void CreateQuadraturePointGeometries(GeometriesArrayType &rResultGeometries, IndexType NumberOfShapeFunctionDerivatives, const IntegrationPointsArrayType &rIntegrationPoints, IntegrationInfo &rIntegrationInfo) override
Definition: brep_curve_on_surface.h:556
BaseType::GeometriesArrayType GeometriesArrayType
Definition: brep_curve_on_surface.h:68
const NurbsCurveOnSurfacePointerType pGetCurveOnSurface() const
Returns the const NurbsCurveOnSurface::Pointer of this brep.
Definition: brep_curve_on_surface.h:305
SizeType PolynomialDegree(IndexType LocalDirectionIndex) const override
Return polynomial degree of the nurbs curve on surface.
Definition: brep_curve_on_surface.h:270
GeometryData::KratosGeometryType GetGeometryType() const override
Definition: brep_curve_on_surface.h:597
void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: brep_curve_on_surface.h:619
int IsInsideLocalSpace(const CoordinatesArrayType &rPointLocalCoordinates, const double Tolerance=std::numeric_limits< double >::epsilon()) const override
Checks if given point in local space coordinates of this geometry is inside the geometry boundaries.
Definition: brep_curve_on_surface.h:341
BrepCurveOnSurface(const PointsArrayType &ThisPoints)
Definition: brep_curve_on_surface.h:139
BrepCurveOnSurface & operator=(BrepCurveOnSurface< TOtherContainerPointType, TOtherContainerPointEmbeddedType > const &rOther)
Assignment operator for geometries with different point type.
Definition: brep_curve_on_surface.h:183
BaseType::CoordinatesArrayType CoordinatesArrayType
Definition: brep_curve_on_surface.h:74
Geometry< typename TContainerPointType::value_type > BaseType
Definition: brep_curve_on_surface.h:55
BrepCurveOnSurface(BrepCurveOnSurface const &rOther)
Copy constructor.
Definition: brep_curve_on_surface.h:145
NurbsCurveOnSurfaceType::Pointer NurbsCurveOnSurfacePointerType
Definition: brep_curve_on_surface.h:66
Geometry< typename TContainerPointType::value_type > GeometryType
Definition: brep_curve_on_surface.h:56
Matrix & ShapeFunctionsLocalGradients(Matrix &rResult, const CoordinatesArrayType &rCoordinates) const override
Definition: brep_curve_on_surface.h:581
BrepCurveOnSurface(NurbsCurveOnSurfacePointerType pNurbsCurveOnSurface, bool SameCurveDirection=true)
constructor for untrimmed surface with curve on surface
Definition: brep_curve_on_surface.h:113
BrepCurveOnSurface & operator=(const BrepCurveOnSurface &rOther)
Assignment operator.
Definition: brep_curve_on_surface.h:172
GeometryData::KratosGeometryFamily GetGeometryFamily() const override
Definition: brep_curve_on_surface.h:592
GeometryData::IntegrationMethod IntegrationMethod
Definition: brep_curve_on_surface.h:59
bool IsInside(const CoordinatesArrayType &rPoint, CoordinatesArrayType &rResult, const double Tolerance=std::numeric_limits< double >::epsilon()) const override
Definition: brep_curve_on_surface.h:485
void SpansLocalSpace(std::vector< double > &rSpans, IndexType DirectionIndex=0) const override
Definition: brep_curve_on_surface.h:325
BrepCurveOnSurface(typename NurbsSurfaceType::Pointer pSurface, typename NurbsCurveType::Pointer pCurve, NurbsInterval CurveNurbsInterval, bool SameCurveDirection=true)
constructor for trimmed surface
Definition: brep_curve_on_surface.h:98
bool HasGeometryPart(const IndexType Index) const override
This function is used to check if the index is either GeometryType::BACKGROUND_GEOMETRY_INDEX or CURV...
Definition: brep_curve_on_surface.h:246
BrepCurveOnSurface(NurbsCurveOnSurfacePointerType pNurbsCurveOnSurface, NurbsInterval CurveNurbsInterval, bool SameCurveDirection=true)
constructor for trimmed surface with curve on surface
Definition: brep_curve_on_surface.h:124
BaseType::IntegrationPointsArrayType IntegrationPointsArrayType
Definition: brep_curve_on_surface.h:75
const GeometryPointer pGetGeometryPart(const IndexType Index) const override
This function returns the pointer of the geometry which is corresponding to the index....
Definition: brep_curve_on_surface.h:228
BrepCurveOnSurface(typename NurbsSurfaceType::Pointer pSurface, typename NurbsCurveType::Pointer pCurve, bool SameCurveDirection=true)
constructor for untrimmed surface
Definition: brep_curve_on_surface.h:84
NurbsCurveOnSurfacePointerType pGetCurveOnSurface()
Returns the NurbsCurveOnSurface::Pointer of this brep.
Definition: brep_curve_on_surface.h:299
static constexpr IndexType CURVE_ON_SURFACE_INDEX
Definition: brep_curve_on_surface.h:77
std::string Info() const override
Turn back information as a string.
Definition: brep_curve_on_surface.h:607
BrepCurveOnSurface(BrepCurveOnSurface< TOtherContainerPointType, TOtherContainerPointEmbeddedType > const &rOther)
Copy constructor from a geometry with different point type.
Definition: brep_curve_on_surface.h:155
BaseType::Pointer Create(PointsArrayType const &ThisPoints) const override
Definition: brep_curve_on_surface.h:196
NurbsCurveOnSurfaceGeometry< 3, TContainerPointEmbeddedType, TContainerPointType > NurbsCurveOnSurfaceType
Definition: brep_curve_on_surface.h:64
IntegrationInfo GetDefaultIntegrationInfo() const override
Provides the default integration dependent on the polynomial degree.
Definition: brep_curve_on_surface.h:518
NurbsCurveGeometry< 2, TContainerPointEmbeddedType > NurbsCurveType
Definition: brep_curve_on_surface.h:62
TContainerPointType::value_type PointType
Definition: brep_curve_on_surface.h:53
void CreateIntegrationPoints(IntegrationPointsArrayType &rIntegrationPoints, IntegrationInfo &rIntegrationInfo) const override
Definition: brep_curve_on_surface.h:530
BrepCurveOnSurface()
Definition: brep_curve_on_surface.h:135
double Length() const override
Computes the length of a nurbs curve.
Definition: brep_curve_on_surface.h:499
GeometryType::Pointer GeometryPointer
Definition: brep_curve_on_surface.h:57
void Calculate(const Variable< array_1d< double, 3 >> &rVariable, array_1d< double, 3 > &rOutput) const override
Calculate with array_1d<double, 3>
Definition: brep_curve_on_surface.h:255
NurbsSurfaceGeometry< 3, TContainerPointType > NurbsSurfaceType
Definition: brep_curve_on_surface.h:61
void GlobalSpaceDerivatives(std::vector< CoordinatesArrayType > &rGlobalSpaceDerivatives, const CoordinatesArrayType &rLocalCoordinates, const SizeType DerivativeOrder) const override
This method maps from local space to global/working space and computes the number of derivatives at t...
Definition: brep_curve_on_surface.h:469
NurbsInterval DomainInterval() const
Definition: brep_curve_on_surface.h:282
SizeType PointsNumberInDirection(IndexType DirectionIndex) const override
Returns number of points of NurbsCurveOnSurface.
Definition: brep_curve_on_surface.h:311
GeometryPointer pGetGeometryPart(const IndexType Index) override
This function returns the pointer of the geometry which is corresponding to the index....
Definition: brep_curve_on_surface.h:213
bool HasSameCurveDirection()
Definition: brep_curve_on_surface.h:293
BaseType::PointsArrayType PointsArrayType
Definition: brep_curve_on_surface.h:73
CoordinatesArrayType & GlobalCoordinates(CoordinatesArrayType &rResult, const CoordinatesArrayType &rLocalCoordinates) const override
Definition: brep_curve_on_surface.h:448
Point Center() const override
Provides the center of the underlying curve on surface.
Definition: brep_curve_on_surface.h:436
int ProjectionPointGlobalToLocalSpace(const CoordinatesArrayType &rPointGlobalCoordinates, CoordinatesArrayType &rProjectedPointLocalCoordinates, const double Tolerance=std::numeric_limits< double >::epsilon()) const override
Projects a point onto the geometry Projects a certain point on the geometry, or finds the closest poi...
Definition: brep_curve_on_surface.h:415
Definition: geometry_data.h:60
KratosGeometryType
Definition: geometry_data.h:110
IntegrationMethod
Definition: geometry_data.h:76
KratosGeometryFamily
Definition: geometry_data.h:91
Definition: geometry_dimension.h:42
Geometry base class.
Definition: geometry.h:71
virtual void PrintData(std::ostream &rOStream) const
Print object's data.
Definition: geometry.h:3834
Geometry & operator=(const Geometry &rOther)
Definition: geometry.h:400
std::vector< IntegrationPointType > IntegrationPointsArrayType
Definition: geometry.h:161
std::size_t SizeType
Definition: geometry.h:144
std::size_t IndexType
Definition: geometry.h:137
IndexType const & Id() const
Id of this Geometry.
Definition: geometry.h:964
static constexpr IndexType BACKGROUND_GEOMETRY_INDEX
Definition: geometry.h:220
Integration information for the creation of integration points.
Definition: integration_info.h:35
static void CreateIntegrationPoints1D(IntegrationPointsArrayType &rIntegrationPoints, const std::vector< double > &rSpansLocalSpace, const IntegrationInfo &rIntegrationInfo)
Definition: integration_point_utilities.cpp:18
Definition: nurbs_curve_geometry.h:33
Definition: nurbs_curve_on_surface_geometry.h:36
Class for optimized use of intervals.
Definition: nurbs_interval.h:36
double MaxParameter() const
Definition: nurbs_interval.h:85
double GetT1() const
Definition: nurbs_interval.h:70
double GetT0() const
Definition: nurbs_interval.h:60
double MinParameter() const
Definition: nurbs_interval.h:80
Definition: nurbs_surface_geometry.h:38
Point class.
Definition: point.h:59
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
static bool NewtonRaphsonCurve(CoordinatesArrayType &rProjectedPointLocalCoordinates, const CoordinatesArrayType &rPointGlobalCoordinatesCoordinates, CoordinatesArrayType &rProjectedPointGlobalCoordinates, const Geometry< TPointType > &rGeometry, const int MaxIterations=20, const double Accuracy=1e-6)
Definition: projection_nurbs_geometry_utilities.h:51
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
Variable class contains all information needed to store and retrive data from a data container.
Definition: variable.h:63
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
static double max(double a, double b)
Definition: GeometryFunctions.h:79
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
std::istream & operator>>(std::istream &rIStream, LinearMasterSlaveConstraint &rThis)
input stream function
const GeometryData BrepCurve< TContainerPointType, TContainerPointEmbeddedType >::msGeometryData & msGeometryDimension
Definition: brep_curve.h:483
std::ostream & operator<<(std::ostream &rOStream, const LinearMasterSlaveConstraint &rThis)
output stream function
Definition: linear_master_slave_constraint.h:432
shared_ptr< C > make_shared(Args &&...args)
Definition: smart_pointers.h:40
def Index()
Definition: hdf5_io_tools.py:38
def load(f)
Definition: ode_solve.py:307
integer i
Definition: TensorModule.f:17