Skip to content

Commit

Permalink
Rubén suggestions
Browse files Browse the repository at this point in the history
andrewgorgi committed Dec 16, 2024
1 parent c39b60b commit a75e7e0
Showing 4 changed files with 27 additions and 12 deletions.
20 changes: 14 additions & 6 deletions kratos/geometries/nurbs_curve_on_surface_geometry.h
Original file line number Diff line number Diff line change
@@ -243,7 +243,9 @@ class NurbsCurveOnSurfaceGeometry : public Geometry<typename TSurfaceContainerPo
* @param vector of span intervals.
* @param index of chosen direction, for curves always 0.
*/
void SpansLocalSpace(std::vector<double>& rSpans, IndexType DirectionIndex = 0) const override
void SpansLocalSpace(
std::vector<double>& rSpans,
IndexType DirectionIndex = 0) const override
{
auto interval = mpNurbsCurve->DomainInterval();
this->SpansLocalSpace(rSpans, interval.GetT0(), interval.GetT1());
@@ -254,7 +256,9 @@ class NurbsCurveOnSurfaceGeometry : public Geometry<typename TSurfaceContainerPo
* @param vector of span intervals.
* @param index of chosen direction, for curves always 0.
*/
void SpansLocalSpaceSBM(std::vector<double>& rSpans, IndexType DirectionIndex = 0) const
void SpansLocalSpaceSBM(
std::vector<double>& rSpans,
IndexType DirectionIndex = 0) const
{
auto interval = mpNurbsCurve->DomainInterval();
this->SpansLocalSpaceSBM(rSpans, interval.GetT0(), interval.GetT1());
@@ -263,8 +267,10 @@ class NurbsCurveOnSurfaceGeometry : public Geometry<typename TSurfaceContainerPo
/* @brief Provides intersections of the nurbs curve with the knots of the surface.
* @return vector of interval limitations.
*/
void SpansLocalSpace(std::vector<double>& rSpans,
double Start, double End) const
void SpansLocalSpace(
std::vector<double>& rSpans,
double Start,
double End) const
{
std::vector<double> surface_spans_u;
std::vector<double> surface_spans_v;
@@ -282,8 +288,10 @@ class NurbsCurveOnSurfaceGeometry : public Geometry<typename TSurfaceContainerPo
/* @brief Provides intersections of the nurbs curve with the knots of the surface in the SBM case.
* @return vector of interval limitations.
*/
void SpansLocalSpaceSBM(std::vector<double>& rSpans,
double Start, double End) const
void SpansLocalSpaceSBM(
std::vector<double>& rSpans,
double Start,
double End) const
{
std::vector<double> surface_spans_u;
std::vector<double> surface_spans_v;
2 changes: 2 additions & 0 deletions kratos/includes/variables.h
Original file line number Diff line number Diff line change
@@ -485,6 +485,8 @@ namespace Kratos
KRATOS_DEFINE_VARIABLE(double, VARIATIONAL_REDISTANCE_COEFFICIENT_FIRST)
KRATOS_DEFINE_VARIABLE(double, VARIATIONAL_REDISTANCE_COEFFICIENT_SECOND)

// SBM variables
KRATOS_DEFINE_VARIABLE(bool, IS_SBM)
} // namespace Kratos.

#undef KRATOS_EXPORT_MACRO
7 changes: 6 additions & 1 deletion kratos/sources/variables.cpp
Original file line number Diff line number Diff line change
@@ -477,6 +477,9 @@ KRATOS_CREATE_3D_VARIABLE_WITH_COMPONENTS(PARAMETER_2D_COORDINATES)
KRATOS_CREATE_VARIABLE(double, VARIATIONAL_REDISTANCE_COEFFICIENT_FIRST)
KRATOS_CREATE_VARIABLE(double, VARIATIONAL_REDISTANCE_COEFFICIENT_SECOND)

// SBM variables
KRATOS_CREATE_VARIABLE(bool, IS_SBM)

//------------------------------------------------------------------------------//
//------------------------------------------------------------------------------//
//------------------------------------------------------------------------------//
@@ -954,6 +957,8 @@ void KratosApplication::RegisterVariables() {
// Variational redistance
KRATOS_REGISTER_VARIABLE(VARIATIONAL_REDISTANCE_COEFFICIENT_FIRST)
KRATOS_REGISTER_VARIABLE(VARIATIONAL_REDISTANCE_COEFFICIENT_SECOND)


// SBM variables
KRATOS_REGISTER_VARIABLE(IS_SBM)
}
} // namespace Kratos.
Original file line number Diff line number Diff line change
@@ -600,7 +600,7 @@ typedef Node NodeType;
brep_coordinates[1][0] = 0.0;
brep_coordinates[1][1] = 3.0;

NurbsCurveOnSurfaceGeometry<3, PointerVector<Point>, PointerVector<Point>> curve_on_surface = GenerateReferenceNurbs2dforKnotIntersections(brep_coordinates);
auto curve_on_surface = GenerateReferenceNurbs2dforKnotIntersections(brep_coordinates);

auto p_surface = curve_on_surface.pGetGeometryPart(GeometryType::BACKGROUND_GEOMETRY_INDEX);

@@ -636,7 +636,7 @@ typedef Node NodeType;
brep_coordinates[1][0] = 2.0;
brep_coordinates[1][1] = 0.0;

NurbsCurveOnSurfaceGeometry<3, PointerVector<Point>, PointerVector<Point>> curve_on_surface = GenerateReferenceNurbs2dforKnotIntersections(brep_coordinates);
auto curve_on_surface = GenerateReferenceNurbs2dforKnotIntersections(brep_coordinates);

auto p_surface = curve_on_surface.pGetGeometryPart(GeometryType::BACKGROUND_GEOMETRY_INDEX);

@@ -670,7 +670,7 @@ typedef Node NodeType;
brep_coordinates[1][0] = 2.0;
brep_coordinates[1][1] = 1.0;

NurbsCurveOnSurfaceGeometry<3, PointerVector<Point>, PointerVector<Point>> curve_on_surface = GenerateReferenceNurbs2dforKnotIntersections(brep_coordinates);
auto curve_on_surface = GenerateReferenceNurbs2dforKnotIntersections(brep_coordinates);
auto p_surface = curve_on_surface.pGetGeometryPart(GeometryType::BACKGROUND_GEOMETRY_INDEX);

std::vector<double> spans;
@@ -703,7 +703,7 @@ typedef Node NodeType;
brep_coordinates[1][0] = 2.0;
brep_coordinates[1][1] = 1.0;

NurbsCurveOnSurfaceGeometry<3, PointerVector<Point>, PointerVector<Point>> curve_on_surface = GenerateReferenceNurbs2dforKnotIntersections(brep_coordinates);
auto curve_on_surface = GenerateReferenceNurbs2dforKnotIntersections(brep_coordinates);
auto p_surface = curve_on_surface.pGetGeometryPart(GeometryType::BACKGROUND_GEOMETRY_INDEX);

// Check general information, input to ouput
@@ -766,7 +766,7 @@ typedef Node NodeType;
brep_coordinates[1][0] = 2.0;
brep_coordinates[1][1] = 0.0;

NurbsCurveOnSurfaceGeometry<3, PointerVector<Point>, PointerVector<Point>> curve_on_surface = GenerateReferenceNurbs2dforKnotIntersections(brep_coordinates);
auto curve_on_surface = GenerateReferenceNurbs2dforKnotIntersections(brep_coordinates);
auto p_surface = curve_on_surface.pGetGeometryPart(GeometryType::BACKGROUND_GEOMETRY_INDEX);

// Check general information, input to ouput

0 comments on commit a75e7e0

Please sign in to comment.