gsNurbs

The methods in gsNurbs contain methods related to NURBS and B-splines.

Function Documentation

Gismo.BSplineMethod
BSpline(basis::Basis,coefs::Matrix{Cdouble})

Defines a B-spline geometry.

Arguments

  • basis::Basis: the basis
  • coefs::Matrix{Cdouble}: the coefficients
source
Gismo.BSplineBasisMethod
BSplineBasis(kv::KnotVector)

Defines a B-spline basis.

Arguments

  • kv::KnotVector: the knot vector
source
Gismo.BSplineCubeFunction

Create a cube represented by a B-spline

Arguments

  • r::Cdouble: the radius of the cube
  • x::Cdouble: the x-coordinate of the center
  • y::Cdouble: the y-coordinate of the center
  • z::Cdouble: the z-coordinate of the center

Examples

g = BSplineCube(1.0,0.0,0.0,0.0)
# output
source
Gismo.BSplineCubeGridFunction

Create a cube grid represented by a multi-patch

Arguments

  • n::Int: the number of patches in x-direction
  • m::Int: the number of patches in y-direction
  • p::Int: the number of patches in z-direction
  • r::Cdouble: the radius of the cube
  • lx::Cdouble: the x-coordinate of the center
  • ly::Cdouble: the y-coordinate of the center
  • lz::Cdouble: the z-coordinate of the center

Examples

g = BSplineCubeGrid(2,2,2,1.0,0.0,0.0,0.0)
# output
source
Gismo.BSplineRectangleFunction

Create a rectangle represented by a B-spline

Arguments

  • low_x::Cdouble: the lower bound in x
  • low_y::Cdouble: the lower bound in y
  • upp_x::Cdouble: the upper bound in x
  • upp_y::Cdouble: the upper bound in y
  • turndeg::Cdouble: the turning degree

Examples

g = BSplineRectangle(0.0,0.0,1.0,1.0,0.0)
# output
source
Gismo.BSplineSquareFunction

Create a square represented by a B-spline

Arguments

  • r::Cdouble: the radius of the square
  • x::Cdouble: the x-coordinate of the center
  • y::Cdouble: the y-coordinate of the center

Examples

g = BSplineSquare(1.0,0.0,0.0)
# output
source
Gismo.BSplineSquareGridFunction

Create a square grid represented by a multi-patch

Arguments

  • n::Int: the number of patches in x-direction
  • m::Int: the number of patches in y-direction
  • r::Cdouble: the radius of the square
  • lx::Cdouble: the x-coordinate of the center
  • ly::Cdouble: the y-coordinate of the center

Examples

g = BSplineSquareGrid(2,2,1.0,0.0,0.0)
# output
source
Gismo.BSplineStarFunction

Create a star represented by a multi-patch

Arguments

  • N::Int: the number of arms
  • R0::Cdouble: the outer radius
  • R1::Cdouble: the inner radius

Examples

g = BSplineStar(3,1.0,0.5)
# output
source
Gismo.BSplineTrapeziumFunction

Create a trapezium represented by a B-spline

Arguments

  • Lbot::Cdouble: the length of the bottom side
  • Ltop::Cdouble: the length of the top side
  • H::Cdouble: the height
  • d::Cdouble: the offset of the top-side w.r.t. the bottom side
  • turndeg::Cdouble: the turning degree

Examples

g = BSplineTrapezium(1.0,0.5,1.0,0.0,0.0)
# output
source
Gismo.BSplineTriangleFunction

Create a triangle represented by a B-spline

Arguments

  • H::Cdouble: the height
  • W::Cdouble: the width

Examples

g = BSplineTriangle(1.0,1.0)
# output
source
Gismo.BSplineUnitIntervalMethod

Create a unit interval represented by a B-spline

Arguments

  • deg::Int: the degree of the B-spline

Examples

g = BSplineUnitInterval(2)
# output
source
Gismo.NurbsMethod
Nurbs(basis::Basis,coefs::Matrix{Cdouble})

Defines a NURBS geometry.

Arguments

  • basis::Basis: the basis
  • coefs::Matrix{Cdouble}: the coefficients
source
Gismo.NurbsAnnulusFunction

Create an annulus represented by a NURBS

Arguments

  • r1::Cdouble: the inner radius
  • r2::Cdouble: the outer radius

Examples

g = NurbsAnnulus(1.0,2.0)
# output
source
Gismo.NurbsBasisMethod
NurbsBasis(kv::KnotVector)

Defines a NURBS basis.

Arguments

  • kv::KnotVector: the knot vector
source
Gismo.NurbsCircleFunction

Create a circle represented by a NURBS

Arguments

  • r::Cdouble: the radius
  • x::Cdouble: the x-coordinate of the center
  • y::Cdouble: the y-coordinate of the center

Examples

g = NurbsCircle(1.0,0.0,0.0)
# output
source
Gismo.NurbsQuarterAnnulusFunction

Create a quarter annulus represented by a NURBS

Arguments

  • r1::Cdouble: the inner radius
  • r2::Cdouble: the outer radius

Examples

g = NurbsQuarterAnnulus(1.0,2.0)
# output
source
Gismo.NurbsSphereFunction

Create a sphere represented by a NURBS

Arguments

  • r::Cdouble: the radius
  • x::Cdouble: the x-coordinate of the center
  • y::Cdouble: the y-coordinate of the center
  • z::Cdouble: the z-coordinate of the center

Examples

g = NurbsSphere(1.0,0.0,0.0,0.0)
# output
source
Gismo.TensorBSplineMethod
TensorBSpline(basis::Basis,coefs::Matrix{Cdouble})

Defines a tensor B-spline geometry.

Arguments

  • basis::Basis: the basis
  • coefs::Matrix{Cdouble}: the coefficients
source
Gismo.TensorBSplineBasisMethod
TensorBSplineBasis(kv1::KnotVector,kv2::KnotVector)

Defines a 2D tensor B-spline basis.

Arguments

  • kv::KnotVector: the knot vectors
source
Gismo.TensorNurbsMethod
TensorNurbs(basis::Basis,coefs::Matrix{Cdouble})

Defines a tensor NURBS geometry.

Arguments

  • basis::Basis: the basis
  • coefs::Matrix{Cdouble}: the coefficients
source
Gismo.TensorNurbsBasisMethod
TensorNurbsBasis(kv1::KnotVector,kv2::KnotVector)

Defines a 2D tensor NURBS basis.

Arguments

  • kv::KnotVector: knot vectors
source
Gismo.numElementsMethod

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.])
print(numElements(kv))
# output
2
source
Gismo.sizeMethod
size(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.])
# output
source
Gismo.uSizeMethod

Size 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
3
source
Gismo.KnotVectorType
KnotVector(filename::String)

Arguments

  • filename::String: the name of the file containing the knot vector

    KnotVector(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
source