14#ifndef _SPLINE_UTILS_H
15#define _SPLINE_UTILS_H
26 struct BasisDerivsSf2;
27 struct BasisDerivsSf3;
43 const double* u =
nullptr);
46 void point(
Vec3& X,
double u,
const Go::SplineCurve* curve);
48 void point(
Vec3& X,
double u,
double v,
const Go::SplineSurface* surf);
50 void point(
Vec3& X,
double u,
double v,
double w,
const Go::SplineVolume* vol);
78 const Go::BsplineBasis& basis,
79 bool skipNullSpans =
false);
82 Go::SplineCurve*
project(
const Go::SplineCurve* curve,
85 bool tangent =
false);
88 Go::SplineSurface*
project(
const Go::SplineSurface* surface,
91 bool tangent =
false);
94 Go::SplineVolume*
project(
const Go::SplineVolume* volume,
97 bool tangent =
false);
107 Go::BsplineBasis
adjustBasis(
const Go::BsplineBasis& basis,
111 std::vector<double>
buildKnotVector(
int p,
const std::vector<double>& simple_knots,
112 const std::vector<int>& continuities);
#define Real
The floating point type to use.
Definition ImmersedBoundaries.h:18
std::vector< Real > RealArray
A real-valued array without algebraic operations.
Definition ImmersedBoundaries.h:32
Global algebraic operations on index 1-based matrices and vectors.
Base class for unary spatial functions of arbitrary result type.
Definition Function.h:147
Simple class for representing a point in 3D space.
Definition Vec3.h:27
Simple class for representing a point in 3D space and time.
Definition Vec3.h:209
A vector class with some added algebraic operations.
Definition matrix.h:64
Various utility functions on spline objects.
Definition ASMmxBase.h:25
AdjustOp
Enumeration of basis adjustment operations.
Definition SplineUtils.h:100
@ Raise
Raise order by one.
@ Lower
Lower order by one.
Go::SplineCurve * project(const Go::SplineCurve *curve, const FunctionBase &f, int nComp=1, Real time=Real(0), bool tangent=false)
Projects a spatial function onto a spline curve.
Definition SplineUtils.C:223
void point(Vec3 &X, double u, const Go::SplineCurve *curve)
Evaluates given spline curve at a parametric point.
Definition SplineUtils.C:64
void extractBasis(const Go::BasisDerivsSf &spline, Vector &N, Matrix &dNdu)
Establishes matrices with basis functions and 1st derivatives.
Definition SplineUtils.C:92
Go::BsplineBasis adjustBasis(const Go::BsplineBasis &basis, AdjustOp adjust)
Returns a basis adjusted according to the given operation.
Definition SplineUtils.C:357
Vec4 toVec4(const Go::Point &X, Real time=Real(0), const double *u=nullptr)
Helper method for casting a Go::Point and time object to Vec4.
Definition SplineUtils.C:53
std::vector< double > buildKnotVector(int p, const std::vector< double > &simple_knots, const std::vector< int > &continuities)
Builds a knot vector from a given polynomial order, knots and continuities.
Definition SplineUtils.C:381
void getGaussParameters(RealArray &uGP, int nGP, const double *xi, const Go::BsplineBasis &basis, bool skipNullSpans=false)
Extracts parameter values of the Gauss points for a spline basis.
Definition SplineUtils.C:200
Vec3 toVec3(const Go::Point &X, int nsd=3)
Helper method for casting a Go::Point object to Vec3.
Definition SplineUtils.C:45