gsNurbs

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

Function Documentation

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

Defines a B-spline geometry.

Arguments

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

Defines a B-spline basis.

Arguments

  • kv::KnotVector: the knot vector
source
Gismo.BSplineCube — Function

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.BSplineCubeGrid — Function

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.BSplineRectangle — Function

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.BSplineSquare — Function

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.BSplineSquareGrid — Function

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.BSplineStar — Function

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.BSplineTrapezium — Function

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.BSplineTriangle — Function

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.BSplineUnitInterval — Method

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.Nurbs — Method
Nurbs(basis::Basis,coefs::Matrix{Cdouble})

Defines a NURBS geometry.

Arguments

  • basis::Basis: the basis
  • coefs::Matrix{Cdouble}: the coefficients
source
Gismo.NurbsAnnulus — Function

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.NurbsBasis — Method
NurbsBasis(kv::KnotVector)

Defines a NURBS basis.

Arguments

  • kv::KnotVector: the knot vector
source
Gismo.NurbsCircle — Function

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.NurbsQuarterAnnulus — Function

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.NurbsSphere — Function

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.TensorBSpline — Method
TensorBSpline(basis::Basis,coefs::Matrix{Cdouble})

Defines a tensor B-spline geometry.

Arguments

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

Defines a 2D tensor B-spline basis.

Arguments

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

Defines a tensor NURBS geometry.

Arguments

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

Defines a 2D tensor NURBS basis.

Arguments

  • kv::KnotVector: knot vectors
source
Gismo.numElements — Method

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.size — Method
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.uSize — Method

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.KnotVector — Type
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