34 template<
class TContainerPo
intType,
class TContainerPo
intEmbeddedType = TContainerPo
intType>
36 :
public Geometry<typename TContainerPointType::value_type>
46 typedef typename TContainerPointType::value_type
PointType;
71 typename NurbsCurveType::Pointer pCurve)
73 , mpNurbsCurve(pCurve)
80 :
BaseType(ThisPoints, &msGeometryData)
87 , mpNurbsCurve(rOther.mpNurbsCurve)
88 , mIsTrimmed(rOther.mIsTrimmed)
93 template<
class TOtherContainerPo
intType,
class TOtherContainerPo
intEmbeddedType>
97 , mpNurbsCurve(rOther.mpNurbsCurve)
98 , mIsTrimmed(rOther.mIsTrimmed)
113 mpNurbsCurve = rOther.mpNurbsCurve;
114 mIsTrimmed = rOther.mIsTrimmed;
119 template<
class TOtherContainerPo
intType,
class TOtherContainerPo
intEmbeddedType>
123 mpNurbsCurve = rOther.mpNurbsCurve;
124 mIsTrimmed = rOther.mIsTrimmed;
134 return typename BaseType::Pointer(
new BrepCurve(ThisPoints));
150 const auto& const_this = *
this;
151 return std::const_pointer_cast<GeometryType>(
152 const_this.pGetGeometryPart(
Index));
168 << this->
Id() << std::endl;
194 if (rVariable == CHARACTERISTIC_GEOMETRY_LENGTH)
196 mpNurbsCurve->Calculate(rVariable, rOutput);
207 return mpNurbsCurve->PolynomialDegree(LocalDirectionIndex);
226 return mpNurbsCurve->PointsNumberInDirection(DirectionIndex);
236 return mpNurbsCurve->Center();
271 const double Tolerance = std::numeric_limits<double>::epsilon()
274 return mpNurbsCurve->ProjectionPointGlobalToLocalSpace(
275 rPointGlobalCoordinates, rProjectedPointLocalCoordinates, Tolerance);
290 mpNurbsCurve->GlobalCoordinates(rResult, rLocalCoordinates);
302 return mpNurbsCurve->GetDefaultIntegrationInfo();
316 std::vector<double> spans;
317 mpNurbsCurve->SpansLocalSpace(spans);
320 rIntegrationPoints, spans, rIntegrationInfo);
338 IndexType NumberOfShapeFunctionDerivatives,
342 mpNurbsCurve->CreateQuadraturePointGeometries(
343 rResultGeometries, NumberOfShapeFunctionDerivatives, rIntegrationPoints, rIntegrationInfo);
346 rResultGeometries(
i)->SetGeometryParent(
this);
358 mpNurbsCurve->ShapeFunctionsValues(rResult, rCoordinates);
367 mpNurbsCurve->ShapeFunctionsLocalGradients(rResult, rCoordinates);
391 std::string
Info()
const override
399 rOStream <<
"BrepCurve";
406 std::cout << std::endl;
407 rOStream <<
" BrepCurve " << std::endl;
424 typename NurbsCurveType::Pointer mpNurbsCurve;
437 void save(
Serializer& rSerializer )
const override
440 rSerializer.
save(
"NurbsCurve", mpNurbsCurve);
441 rSerializer.
save(
"IsTrimmed", mIsTrimmed);
447 rSerializer.
load(
"NurbsCurve", mpNurbsCurve);
448 rSerializer.
load(
"IsTrimmed", mIsTrimmed);
463 template<
class TContainerPo
intType,
class TContainerPo
intEmbeddedType = TContainerPo
intType>
inline std::istream&
operator >> (
464 std::istream& rIStream,
468 template<
class TContainerPo
intType,
class TContainerPo
intEmbeddedType = TContainerPo
intType>
inline std::ostream&
operator << (
469 std::ostream& rOStream,
473 rOStream << std::endl;
482 template<
class TContainerPo
intType,
class TContainerPo
intEmbeddedType>
const
488 template<
class TContainerPo
intType,
class TContainerPo
intEmbeddedType>
The BrepCurve acts as topology for curves. Those can be enclosed by a certain set of points.
Definition: brep_curve.h:37
SizeType PolynomialDegree(IndexType LocalDirectionIndex) const override
Return polynomial degree of the nurbs surface.
Definition: brep_curve.h:205
Vector & ShapeFunctionsValues(Vector &rResult, const CoordinatesArrayType &rCoordinates) const override
Definition: brep_curve.h:354
Matrix & ShapeFunctionsLocalGradients(Matrix &rResult, const CoordinatesArrayType &rCoordinates) const override
Definition: brep_curve.h:363
int ProjectionPointGlobalToLocalSpace(const CoordinatesArrayType &rPointGlobalCoordinates, CoordinatesArrayType &rProjectedPointLocalCoordinates, const double Tolerance=std::numeric_limits< double >::epsilon()) const override
Calls projection of its nurbs curve. Projects a certain point on the geometry, or finds the closest p...
Definition: brep_curve.h:268
BrepCurve(BrepCurve const &rOther)
Copy constructor.
Definition: brep_curve.h:85
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: brep_curve.h:397
BaseType::Pointer Create(PointsArrayType const &ThisPoints) const override
Definition: brep_curve.h:132
GeometryType::Pointer GeometryPointer
Definition: brep_curve.h:50
BaseType::CoordinatesArrayType CoordinatesArrayType
Definition: brep_curve.h:62
BaseType::GeometriesArrayType GeometriesArrayType
Definition: brep_curve.h:56
GeometryData::KratosGeometryType GetGeometryType() const override
Definition: brep_curve.h:381
bool IsTrimmed() const
Definition: brep_curve.h:218
Geometry< typename TContainerPointType::value_type > GeometryType
Definition: brep_curve.h:49
void CreateIntegrationPoints(IntegrationPointsArrayType &rIntegrationPoints, IntegrationInfo &rIntegrationInfo) const override
Definition: brep_curve.h:312
BrepCurve & operator=(BrepCurve< TOtherContainerPointType, TOtherContainerPointEmbeddedType > const &rOther)
Assignment operator for geometries with different point type.
Definition: brep_curve.h:120
BrepCurve & operator=(const BrepCurve &rOther)
Assignment operator.
Definition: brep_curve.h:110
TContainerPointType::value_type PointType
Definition: brep_curve.h:46
GeometryPointer pGetGeometryPart(const IndexType Index) override
This function returns the pointer of the geometry which is corresponding to the index....
Definition: brep_curve.h:148
BaseType::IndexType IndexType
Definition: brep_curve.h:58
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.h:190
BaseType::PointsArrayType PointsArrayType
Definition: brep_curve.h:61
KRATOS_CLASS_POINTER_DEFINITION(BrepCurve)
Pointer definition of BrepCurve.
BrepCurve(BrepCurve< TOtherContainerPointType, TOtherContainerPointEmbeddedType > const &rOther)
Copy constructor from a geometry with different point type.
Definition: brep_curve.h:94
GeometryData::KratosGeometryFamily GetGeometryFamily() const override
Definition: brep_curve.h:376
SizeType PointsNumberInDirection(IndexType DirectionIndex) const override
Returns number of points of NurbsSurface.
Definition: brep_curve.h:224
Point Center() const override
Provides the center of the underlying surface.
Definition: brep_curve.h:234
BrepCurve(const PointsArrayType &ThisPoints)
Constructor default.
Definition: brep_curve.h:79
std::string Info() const override
Turn back information as a string.
Definition: brep_curve.h:391
IntegrationInfo GetDefaultIntegrationInfo() const override
Provides the default integration dependent on the polynomial degree.
Definition: brep_curve.h:300
BaseType::IntegrationPointsArrayType IntegrationPointsArrayType
Definition: brep_curve.h:63
void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: brep_curve.h:403
NurbsCurveGeometry< 3, TContainerPointType > NurbsCurveType
Definition: brep_curve.h:54
BrepCurve(typename NurbsCurveType::Pointer pCurve)
Constructor for untrimmed curve.
Definition: brep_curve.h:70
GeometryData::IntegrationMethod IntegrationMethod
Definition: brep_curve.h:52
Geometry< typename TContainerPointType::value_type > BaseType
Definition: brep_curve.h:48
~BrepCurve() override=default
Destructor.
bool HasGeometryPart(const IndexType Index) const override
This function is used to check if this BrepCurve has certain trim or curve object.
Definition: brep_curve.h:177
const GeometryPointer pGetGeometryPart(const IndexType Index) const override
This function returns the pointer of the geometry which is corresponding to the trim index....
Definition: brep_curve.h:162
BaseType::SizeType SizeType
Definition: brep_curve.h:59
void CreateQuadraturePointGeometries(GeometriesArrayType &rResultGeometries, IndexType NumberOfShapeFunctionDerivatives, const IntegrationPointsArrayType &rIntegrationPoints, IntegrationInfo &rIntegrationInfo) override
Definition: brep_curve.h:336
CoordinatesArrayType & GlobalCoordinates(CoordinatesArrayType &rResult, const CoordinatesArrayType &rLocalCoordinates) const override
Definition: brep_curve.h:285
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
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
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
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
def load(f)
Definition: ode_solve.py:307
integer i
Definition: TensorModule.f:17