gsNurbs
The methods in gsNurbs contain methods related to NURBS and B-splines.
Function Documentation
Gismo.BSpline — MethodBSpline(basis::Basis,coefs::Matrix{Cdouble})Defines a B-spline geometry.
Arguments
basis::Basis: the basiscoefs::Matrix{Cdouble}: the coefficients
Gismo.BSplineBasis — MethodBSplineBasis(kv::KnotVector)Defines a B-spline basis.
Arguments
kv::KnotVector: the knot vector
Gismo.BSplineCube — FunctionCreate a cube represented by a B-spline
Arguments
r::Cdouble: the radius of the cubex::Cdouble: the x-coordinate of the centery::Cdouble: the y-coordinate of the centerz::Cdouble: the z-coordinate of the center
Examples
g = BSplineCube(1.0,0.0,0.0,0.0)
# outputGismo.BSplineCubeGrid — FunctionCreate a cube grid represented by a multi-patch
Arguments
n::Int: the number of patches in x-directionm::Int: the number of patches in y-directionp::Int: the number of patches in z-directionr::Cdouble: the radius of the cubelx::Cdouble: the x-coordinate of the centerly::Cdouble: the y-coordinate of the centerlz::Cdouble: the z-coordinate of the center
Examples
g = BSplineCubeGrid(2,2,2,1.0,0.0,0.0,0.0)
# outputGismo.BSplineRectangle — FunctionCreate a rectangle represented by a B-spline
Arguments
low_x::Cdouble: the lower bound in xlow_y::Cdouble: the lower bound in yupp_x::Cdouble: the upper bound in xupp_y::Cdouble: the upper bound in yturndeg::Cdouble: the turning degree
Examples
g = BSplineRectangle(0.0,0.0,1.0,1.0,0.0)
# outputGismo.BSplineSaddle — MethodCreate a saddle represented by a B-spline
Examples
g = BSplineSaddle()
# outputGismo.BSplineSquare — FunctionCreate a square represented by a B-spline
Arguments
r::Cdouble: the radius of the squarex::Cdouble: the x-coordinate of the centery::Cdouble: the y-coordinate of the center
Examples
g = BSplineSquare(1.0,0.0,0.0)
# outputGismo.BSplineSquareGrid — FunctionCreate a square grid represented by a multi-patch
Arguments
n::Int: the number of patches in x-directionm::Int: the number of patches in y-directionr::Cdouble: the radius of the squarelx::Cdouble: the x-coordinate of the centerly::Cdouble: the y-coordinate of the center
Examples
g = BSplineSquareGrid(2,2,1.0,0.0,0.0)
# outputGismo.BSplineStar — FunctionCreate a star represented by a multi-patch
Arguments
N::Int: the number of armsR0::Cdouble: the outer radiusR1::Cdouble: the inner radius
Examples
g = BSplineStar(3,1.0,0.5)
# outputGismo.BSplineTrapezium — FunctionCreate a trapezium represented by a B-spline
Arguments
Lbot::Cdouble: the length of the bottom sideLtop::Cdouble: the length of the top sideH::Cdouble: the heightd::Cdouble: the offset of the top-side w.r.t. the bottom sideturndeg::Cdouble: the turning degree
Examples
g = BSplineTrapezium(1.0,0.5,1.0,0.0,0.0)
# outputGismo.BSplineTriangle — FunctionCreate a triangle represented by a B-spline
Arguments
H::Cdouble: the heightW::Cdouble: the width
Examples
g = BSplineTriangle(1.0,1.0)
# outputGismo.BSplineUnitInterval — MethodCreate a unit interval represented by a B-spline
Arguments
deg::Int: the degree of the B-spline
Examples
g = BSplineUnitInterval(2)
# outputGismo.Nurbs — MethodNurbs(basis::Basis,coefs::Matrix{Cdouble})Defines a NURBS geometry.
Arguments
basis::Basis: the basiscoefs::Matrix{Cdouble}: the coefficients
Gismo.NurbsAnnulus — FunctionCreate an annulus represented by a NURBS
Arguments
r1::Cdouble: the inner radiusr2::Cdouble: the outer radius
Examples
g = NurbsAnnulus(1.0,2.0)
# outputGismo.NurbsBasis — MethodNurbsBasis(kv::KnotVector)Defines a NURBS basis.
Arguments
kv::KnotVector: the knot vector
Gismo.NurbsCircle — FunctionCreate a circle represented by a NURBS
Arguments
r::Cdouble: the radiusx::Cdouble: the x-coordinate of the centery::Cdouble: the y-coordinate of the center
Examples
g = NurbsCircle(1.0,0.0,0.0)
# outputGismo.NurbsQuarterAnnulus — FunctionCreate a quarter annulus represented by a NURBS
Arguments
r1::Cdouble: the inner radiusr2::Cdouble: the outer radius
Examples
g = NurbsQuarterAnnulus(1.0,2.0)
# outputGismo.NurbsSphere — FunctionCreate a sphere represented by a NURBS
Arguments
r::Cdouble: the radiusx::Cdouble: the x-coordinate of the centery::Cdouble: the y-coordinate of the centerz::Cdouble: the z-coordinate of the center
Examples
g = NurbsSphere(1.0,0.0,0.0,0.0)
# outputGismo.TensorBSpline — MethodTensorBSpline(basis::Basis,coefs::Matrix{Cdouble})Defines a tensor B-spline geometry.
Arguments
basis::Basis: the basiscoefs::Matrix{Cdouble}: the coefficients
Gismo.TensorBSplineBasis — MethodTensorBSplineBasis(kv1::KnotVector,kv2::KnotVector)Defines a 2D tensor B-spline basis.
Arguments
kv::KnotVector: the knot vectors
Gismo.TensorNurbs — MethodTensorNurbs(basis::Basis,coefs::Matrix{Cdouble})Defines a tensor NURBS geometry.
Arguments
basis::Basis: the basiscoefs::Matrix{Cdouble}: the coefficients
Gismo.TensorNurbsBasis — MethodTensorNurbsBasis(kv1::KnotVector,kv2::KnotVector)Defines a 2D tensor NURBS basis.
Arguments
kv::KnotVector: knot vectors
Gismo.numElements — MethodNumber of elements in the knot vector
Arguments
kv::KnotVector: the knot vector
Examples
kv = KnotVector(Float64[0.,0.,0.,0.,0.5,1.,1.,1.,1.])
print(numElements(kv))
# output
2Gismo.size — Methodsize(kv::KnotVector)Returns the number of elements in the knot vector.
Arguments
kv::KnotVector: the knot vector
Examples
kv = KnotVector(Float64[0.,0.,0.,0.,0.5,1.,1.,1.,1.])
# outputGismo.uSize — MethodSize of the unique knots
Arguments
kv::KnotVector: the knot vector
Examples
kv = KnotVector(Float64[0.,0.,0.,0.,0.5,0.5,1.,1.,1.,1.])
print(uSize(kv))
# output
3Gismo.KnotVector — TypeKnotVector(filename::String)Arguments
filename::String: the name of the file containing the knot vectorKnotVector(a::Vector{Float64})
Arguments
a::Vector{Float64}: the knot vector
Examples
kv = KnotVector(Float64[0.,0.,0.,0.,0.5,1.,1.,1.,1.])
# output