nurbs_volume Derived Type

type, public :: nurbs_volume


Components

Type Visibility Attributes Name Initial
real(kind=rk), private, allocatable :: Wc(:)

Weights for the control points (1D array: [nc(1)nc(2)nc(3)])

real(kind=rk), private, allocatable :: Xc(:,:)

Control points (2D array: [nc(1)nc(2)nc(3), dim])

real(kind=rk), private, allocatable :: Xg(:,:)

Geometry points (2D array: [ng(1)ng(2)ng(3), dim])

real(kind=rk), private, allocatable :: Xt(:,:)

Evaluation parameter values (2D array: [ng(1)ng(2)ng(3), dim]

real(kind=rk), private, allocatable :: Xt1(:)

Evaluation parameter values in the first direction (1D array: [ng(1)])

real(kind=rk), private, allocatable :: Xt2(:)

Evaluation parameter values in the second direction (1D array: [ng(2)])

real(kind=rk), private, allocatable :: Xt3(:)

Evaluation parameter values in the third direction (1D array: [ng(3)])

integer, private :: degree(3)

Degree (order) of the volume

integer, private, allocatable :: elemConn(:,:)

IGA element connectivity

integer, private, allocatable :: elemConn_Xc_vis(:,:)

Connectivity for visualization of control points

integer, private, allocatable :: elemConn_Xg_vis(:,:)

Connectivity for visualization of geometry points

real(kind=rk), private, allocatable :: knot1(:)

Knot vector in the first direction (1D array)

real(kind=rk), private, allocatable :: knot2(:)

Knot vector in the second direction (1D array)

real(kind=rk), private, allocatable :: knot3(:)

Knot vector in the third direction (1D array)

integer, private :: nc(3)

Number of control points in each direction

integer, private :: ng(3)

Number of geometry points in each direction


Type-Bound Procedures

procedure, public :: ansatz

Compute the shape functions, derivative of shape functions and dV

  • private pure subroutine ansatz(this, ie, ig, Tgc, dTgc_dXg, dV)

    Author
    Seyed Ali Ghasemi
    License
    BSD 3-Clause

    Arguments

    Type IntentOptional Attributes Name
    class(nurbs_volume), intent(inout) :: this
    integer, intent(in) :: ie
    integer, intent(in) :: ig
    real(kind=rk), intent(out), allocatable :: Tgc(:)
    real(kind=rk), intent(out), allocatable :: dTgc_dXg(:,:)
    real(kind=rk), intent(out) :: dV

generic, public :: basis => basis_vector, basis_scalar

Compute the basis functions of the NURBS volume

  • private pure subroutine basis_vector(this, res1, res2, res3, Xt1, Xt2, Xt3, Tgc)

    Author
    Seyed Ali Ghasemi
    License
    BSD 3-Clause

    Arguments

    Type IntentOptional Attributes Name
    class(nurbs_volume), intent(inout) :: this
    integer, intent(in), optional :: res1
    integer, intent(in), optional :: res2
    integer, intent(in), optional :: res3
    real(kind=rk), intent(in), optional, contiguous :: Xt1(:)
    real(kind=rk), intent(in), optional, contiguous :: Xt2(:)
    real(kind=rk), intent(in), optional, contiguous :: Xt3(:)
    real(kind=rk), intent(out), allocatable :: Tgc(:,:)
  • private pure subroutine basis_scalar(this, Xt, Tgc)

    Author
    Seyed Ali Ghasemi
    License
    BSD 3-Clause

    Arguments

    Type IntentOptional Attributes Name
    class(nurbs_volume), intent(inout) :: this
    real(kind=rk), intent(in), contiguous :: Xt(:)
    real(kind=rk), intent(out), allocatable :: Tgc(:)

procedure, public :: cmp_Xg

Compute geometry points

  • private pure function cmp_Xg(this, Xt) result(Xg)

    Author
    Seyed Ali Ghasemi
    License
    BSD 3-Clause

    Arguments

    Type IntentOptional Attributes Name
    class(nurbs_volume), intent(in) :: this
    real(kind=rk), intent(in), contiguous :: Xt(:)

    Return Value real(kind=rk), allocatable, (:)

procedure, public :: cmp_degree

Compute degree of the NURBS volume

  • private pure subroutine cmp_degree(this, dir)

    Author
    Seyed Ali Ghasemi
    License
    BSD 3-Clause

    Arguments

    Type IntentOptional Attributes Name
    class(nurbs_volume), intent(inout) :: this
    integer, intent(in), optional :: dir

procedure, public :: cmp_degreeFace

Compute degrees of the faces

  • private pure function cmp_degreeFace(this, face) result(degree)

    Author
    Seyed Ali Ghasemi
    License
    BSD 3-Clause

    Arguments

    Type IntentOptional Attributes Name
    class(nurbs_volume), intent(in) :: this
    integer, intent(in) :: face

    Return Value integer, (3)

procedure, public :: cmp_elem

Generate IGA element connectivity

  • private pure function cmp_elem(this) result(elemConn)

    Author
    Seyed Ali Ghasemi
    License
    BSD 3-Clause

    Arguments

    Type IntentOptional Attributes Name
    class(nurbs_volume), intent(in) :: this

    Return Value integer, allocatable, (:,:)

procedure, public :: cmp_elemFace

Compute faces of the IGA elements

  • private pure function cmp_elemFace(this, elem, face) result(elemConn)

    Author
    Seyed Ali Ghasemi
    License
    BSD 3-Clause

    number of nodes in each direction

    Arguments

    Type IntentOptional Attributes Name
    class(nurbs_volume), intent(in) :: this
    integer, intent(in) :: elem
    integer, intent(in) :: face

    Return Value integer, allocatable, (:)

procedure, public :: cmp_elemFace_Xc_vis

Compute faces of the control points

  • private pure function cmp_elemFace_Xc_vis(this, elem, face) result(elemConn)

    Author
    Seyed Ali Ghasemi
    License
    BSD 3-Clause

    number of nodes in each direction

    Arguments

    Type IntentOptional Attributes Name
    class(nurbs_volume), intent(in) :: this
    integer, intent(in) :: elem
    integer, intent(in) :: face

    Return Value integer, allocatable, (:)

procedure, public :: cmp_elemFace_Xg_vis

Compute faces of the geometry points

  • private pure function cmp_elemFace_Xg_vis(this, elem, face) result(elemConn)

    Author
    Seyed Ali Ghasemi
    License
    BSD 3-Clause

    number of nodes in each direction

    Arguments

    Type IntentOptional Attributes Name
    class(nurbs_volume), intent(in) :: this
    integer, intent(in) :: elem
    integer, intent(in) :: face

    Return Value integer, allocatable, (:)

procedure, public :: cmp_elem_Xc_vis

Generate connectivity for control points

  • private pure function cmp_elem_Xc_vis(this, p) result(elemConn)

    Author
    Seyed Ali Ghasemi
    License
    BSD 3-Clause

    Arguments

    Type IntentOptional Attributes Name
    class(nurbs_volume), intent(in) :: this
    integer, intent(in), optional, contiguous :: p(:)

    Return Value integer, allocatable, (:,:)

procedure, public :: cmp_elem_Xg_vis

Generate connectivity for geometry points

  • private pure function cmp_elem_Xg_vis(this, p) result(elemConn)

    Author
    Seyed Ali Ghasemi
    License
    BSD 3-Clause

    Arguments

    Type IntentOptional Attributes Name
    class(nurbs_volume), intent(in) :: this
    integer, intent(in), optional, contiguous :: p(:)

    Return Value integer, allocatable, (:,:)

procedure, public :: cmp_nc

Compute number of required control points

  • private pure subroutine cmp_nc(this, dir)

    Author
    Seyed Ali Ghasemi
    License
    BSD 3-Clause

    Arguments

    Type IntentOptional Attributes Name
    class(nurbs_volume), intent(inout) :: this
    integer, intent(in), optional :: dir

procedure, public :: cmp_volume

Compute the volume of the NURBS volume

  • private pure subroutine cmp_volume(this, volume)

    Author
    Seyed Ali Ghasemi
    License
    BSD 3-Clause

    Arguments

    Type IntentOptional Attributes Name
    class(nurbs_volume), intent(inout) :: this
    real(kind=rk), intent(out) :: volume

procedure, public :: create

Generate geometry points

  • private pure subroutine create(this, res1, res2, res3, Xt1, Xt2, Xt3, Xt)

    Author
    Seyed Ali Ghasemi
    License
    BSD 3-Clause

    Arguments

    Type IntentOptional Attributes Name
    class(nurbs_volume), intent(inout) :: this
    integer, intent(in), optional :: res1
    integer, intent(in), optional :: res2
    integer, intent(in), optional :: res3
    real(kind=rk), intent(in), optional, contiguous :: Xt1(:)
    real(kind=rk), intent(in), optional, contiguous :: Xt2(:)
    real(kind=rk), intent(in), optional, contiguous :: Xt3(:)
    real(kind=rk), intent(in), optional, contiguous :: Xt(:,:)

generic, public :: derivative => derivative_vector, derivative_scalar

Compute the derivative of the NURBS volume

  • private pure subroutine derivative_vector(this, res1, res2, res3, Xt1, Xt2, Xt3, dTgc, Tgc)

    Author
    Seyed Ali Ghasemi
    License
    BSD 3-Clause

    Arguments

    Type IntentOptional Attributes Name
    class(nurbs_volume), intent(inout) :: this
    integer, intent(in), optional :: res1
    integer, intent(in), optional :: res2
    integer, intent(in), optional :: res3
    real(kind=rk), intent(in), optional, contiguous :: Xt1(:)
    real(kind=rk), intent(in), optional, contiguous :: Xt2(:)
    real(kind=rk), intent(in), optional, contiguous :: Xt3(:)
    real(kind=rk), intent(out), allocatable :: dTgc(:,:,:)
    real(kind=rk), intent(out), optional, allocatable :: Tgc(:,:)
  • private pure subroutine derivative_scalar(this, Xt, dTgc, Tgc, elem)

    Author
    Seyed Ali Ghasemi
    License
    BSD 3-Clause

    Arguments

    Type IntentOptional Attributes Name
    class(nurbs_volume), intent(inout) :: this
    real(kind=rk), intent(in), contiguous :: Xt(:)
    real(kind=rk), intent(out), allocatable :: dTgc(:,:)
    real(kind=rk), intent(out), optional, allocatable :: Tgc(:)
    integer, intent(in), optional :: elem(:)

generic, public :: derivative2 => derivative2_vector, derivative2_scalar

Compute the second derivative of the NURBS volume

  • private pure subroutine derivative2_vector(this, res1, res2, res3, Xt1, Xt2, Xt3, d2Tgc, dTgc, Tgc)

    Author
    Seyed Ali Ghasemi
    License
    BSD 3-Clause

    Arguments

    Type IntentOptional Attributes Name
    class(nurbs_volume), intent(inout) :: this
    integer, intent(in), optional :: res1
    integer, intent(in), optional :: res2
    integer, intent(in), optional :: res3
    real(kind=rk), intent(in), optional, contiguous :: Xt1(:)
    real(kind=rk), intent(in), optional, contiguous :: Xt2(:)
    real(kind=rk), intent(in), optional, contiguous :: Xt3(:)
    real(kind=rk), intent(out), allocatable :: d2Tgc(:,:,:)
    real(kind=rk), intent(out), optional, allocatable :: dTgc(:,:,:)
    real(kind=rk), intent(out), optional, allocatable :: Tgc(:,:)
  • private pure subroutine derivative2_scalar(this, Xt, d2Tgc, dTgc, Tgc)

    Author
    Seyed Ali Ghasemi
    License
    BSD 3-Clause

    Arguments

    Type IntentOptional Attributes Name
    class(nurbs_volume), intent(inout) :: this
    real(kind=rk), intent(in), contiguous :: Xt(:)
    real(kind=rk), intent(out), allocatable :: d2Tgc(:,:)
    real(kind=rk), intent(out), optional, allocatable :: dTgc(:,:)
    real(kind=rk), intent(out), optional, allocatable :: Tgc(:)

procedure, public :: elevate_degree

Elevate the degree of the NURBS volume

  • private pure subroutine elevate_degree(this, dir, t)

    Author
    Seyed Ali Ghasemi
    License
    BSD 3-Clause

    Arguments

    Type IntentOptional Attributes Name
    class(nurbs_volume), intent(inout) :: this
    integer, intent(in) :: dir
    integer, intent(in) :: t

procedure, public :: export_Xc

Export control points to VTK file

  • private impure subroutine export_Xc(this, filename)

    Author
    Seyed Ali Ghasemi
    License
    BSD 3-Clause

    Arguments

    Type IntentOptional Attributes Name
    class(nurbs_volume), intent(in) :: this
    character(len=*), intent(in) :: filename

procedure, public :: export_Xg

Export geometry points to VTK file

  • private impure subroutine export_Xg(this, filename)

    Author
    Seyed Ali Ghasemi
    License
    BSD 3-Clause

    Arguments

    Type IntentOptional Attributes Name
    class(nurbs_volume), intent(in) :: this
    character(len=*), intent(in) :: filename

procedure, public :: finalize

Finalize the NURBS volume object

  • private pure subroutine finalize(this)

    Author
    Seyed Ali Ghasemi
    License
    BSD 3-Clause

    Arguments

    Type IntentOptional Attributes Name
    class(nurbs_volume), intent(inout) :: this

generic, public :: get_Wc => get_Wc_all, get_Wci

Get weights

  • private pure function get_Wc_all(this) result(Wc)

    Author
    Seyed Ali Ghasemi
    License
    BSD 3-Clause

    Arguments

    Type IntentOptional Attributes Name
    class(nurbs_volume), intent(in) :: this

    Return Value real(kind=rk), allocatable, (:)

  • private pure function get_Wci(this, n) result(Wc)

    Author
    Seyed Ali Ghasemi
    License
    BSD 3-Clause

    Arguments

    Type IntentOptional Attributes Name
    class(nurbs_volume), intent(in) :: this
    integer, intent(in) :: n

    Return Value real(kind=rk)

generic, public :: get_Xc => get_Xc_all, get_Xci, get_Xcid

Get control points

  • private pure function get_Xc_all(this) result(Xc)

    Author
    Seyed Ali Ghasemi
    License
    BSD 3-Clause

    Arguments

    Type IntentOptional Attributes Name
    class(nurbs_volume), intent(in) :: this

    Return Value real(kind=rk), allocatable, (:,:)

  • private pure function get_Xci(this, n) result(Xc)

    Author
    Seyed Ali Ghasemi
    License
    BSD 3-Clause

    Arguments

    Type IntentOptional Attributes Name
    class(nurbs_volume), intent(in) :: this
    integer, intent(in) :: n

    Return Value real(kind=rk), allocatable, (:)

  • private pure function get_Xcid(this, n, dir) result(Xc)

    Author
    Seyed Ali Ghasemi
    License
    BSD 3-Clause

    Arguments

    Type IntentOptional Attributes Name
    class(nurbs_volume), intent(in) :: this
    integer, intent(in) :: n
    integer, intent(in) :: dir

    Return Value real(kind=rk)

generic, public :: get_Xg => get_Xg_all, get_Xgi, get_Xgid

Get geometry points

  • private pure function get_Xg_all(this) result(Xg)

    Author
    Seyed Ali Ghasemi
    License
    BSD 3-Clause

    Arguments

    Type IntentOptional Attributes Name
    class(nurbs_volume), intent(in) :: this

    Return Value real(kind=rk), allocatable, (:,:)

  • private pure function get_Xgi(this, n) result(Xg)

    Author
    Seyed Ali Ghasemi
    License
    BSD 3-Clause

    Arguments

    Type IntentOptional Attributes Name
    class(nurbs_volume), intent(in) :: this
    integer, intent(in) :: n

    Return Value real(kind=rk), allocatable, (:)

  • private pure function get_Xgid(this, n, dir) result(Xg)

    Author
    Seyed Ali Ghasemi
    License
    BSD 3-Clause

    Arguments

    Type IntentOptional Attributes Name
    class(nurbs_volume), intent(in) :: this
    integer, intent(in) :: n
    integer, intent(in) :: dir

    Return Value real(kind=rk)

procedure, public :: get_Xt

Get parameter values

  • private pure function get_Xt(this, dir) result(Xt)

    Author
    Seyed Ali Ghasemi
    License
    BSD 3-Clause

    Arguments

    Type IntentOptional Attributes Name
    class(nurbs_volume), intent(in) :: this
    integer, intent(in) :: dir

    Return Value real(kind=rk), allocatable, (:)

procedure, public :: get_continuity

Compute and return the continuity of the NURBS volume

  • private pure function get_continuity(this, dir) result(c)

    Author
    Seyed Ali Ghasemi
    License
    BSD 3-Clause

    Arguments

    Type IntentOptional Attributes Name
    class(nurbs_volume), intent(in) :: this
    integer, intent(in) :: dir

    Return Value integer, allocatable, (:)

generic, public :: get_degree => get_degree_all, get_degree_dir

Get degree of the NURBS volume

  • private pure function get_degree_all(this) result(degree)

    Author
    Seyed Ali Ghasemi
    License
    BSD 3-Clause

    Arguments

    Type IntentOptional Attributes Name
    class(nurbs_volume), intent(in) :: this

    Return Value integer, (3)

  • private pure function get_degree_dir(this, dir) result(degree)

    Author
    Seyed Ali Ghasemi
    License
    BSD 3-Clause

    Arguments

    Type IntentOptional Attributes Name
    class(nurbs_volume), intent(in) :: this
    integer, intent(in) :: dir

    Return Value integer

procedure, public :: get_elem

Get IGA element connectivity

  • private pure function get_elem(this) result(elemConn)

    Author
    Seyed Ali Ghasemi
    License
    BSD 3-Clause

    Arguments

    Type IntentOptional Attributes Name
    class(nurbs_volume), intent(in) :: this

    Return Value integer, allocatable, (:,:)

procedure, public :: get_elem_Xc_vis

Get connectivity for control points

  • private pure function get_elem_Xc_vis(this) result(elemConn)

    Author
    Seyed Ali Ghasemi
    License
    BSD 3-Clause

    Arguments

    Type IntentOptional Attributes Name
    class(nurbs_volume), intent(in) :: this

    Return Value integer, allocatable, (:,:)

procedure, public :: get_elem_Xg_vis

Get connectivity for geometry points

  • private pure function get_elem_Xg_vis(this) result(elemConn)

    Author
    Seyed Ali Ghasemi
    License
    BSD 3-Clause

    Arguments

    Type IntentOptional Attributes Name
    class(nurbs_volume), intent(in) :: this

    Return Value integer, allocatable, (:,:)

generic, public :: get_knot => get_knoti, get_knot_all

Get knot vector

  • private pure function get_knoti(this, dir, i) result(knot)

    Author
    Seyed Ali Ghasemi
    License
    BSD 3-Clause

    Arguments

    Type IntentOptional Attributes Name
    class(nurbs_volume), intent(in) :: this
    integer, intent(in) :: dir
    integer, intent(in) :: i

    Return Value real(kind=rk)

  • private pure function get_knot_all(this, dir) result(knot)

    Author
    Seyed Ali Ghasemi
    License
    BSD 3-Clause

    Arguments

    Type IntentOptional Attributes Name
    class(nurbs_volume), intent(in) :: this
    integer, intent(in) :: dir

    Return Value real(kind=rk), allocatable, (:)

procedure, public :: get_multiplicity

Compute and return the multiplicity of the knots

  • private pure function get_multiplicity(this, dir) result(m)

    Author
    Seyed Ali Ghasemi
    License
    BSD 3-Clause

    Arguments

    Type IntentOptional Attributes Name
    class(nurbs_volume), intent(in) :: this
    integer, intent(in) :: dir

    Return Value integer, allocatable, (:)

generic, public :: get_nc => get_nc_all, get_nc_dir

Get number of control points

  • private pure function get_nc_all(this) result(nc)

    Author
    Seyed Ali Ghasemi
    License
    BSD 3-Clause

    Arguments

    Type IntentOptional Attributes Name
    class(nurbs_volume), intent(in) :: this

    Return Value integer, (3)

  • private pure function get_nc_dir(this, dir) result(nc)

    Author
    Seyed Ali Ghasemi
    License
    BSD 3-Clause

    Arguments

    Type IntentOptional Attributes Name
    class(nurbs_volume), intent(in) :: this
    integer, intent(in) :: dir

    Return Value integer

procedure, public :: get_ng

Get number of geometry points

  • private pure function get_ng(this) result(ng)

    Author
    Seyed Ali Ghasemi
    License
    BSD 3-Clause

    Arguments

    Type IntentOptional Attributes Name
    class(nurbs_volume), intent(in) :: this

    Return Value integer, (3)

procedure, public :: insert_knots

Insert knots into the knot vector

  • private pure subroutine insert_knots(this, dir, Xth, r)

    Author
    Seyed Ali Ghasemi
    License
    BSD 3-Clause

    Arguments

    Type IntentOptional Attributes Name
    class(nurbs_volume), intent(inout) :: this
    integer, intent(in) :: dir
    real(kind=rk), intent(in), contiguous :: Xth(:)
    integer, intent(in), contiguous :: r(:)

procedure, public :: is_rational

Check if the NURBS volume is rational

  • private pure function is_rational(this) result(r)

    Author
    Seyed Ali Ghasemi
    License
    BSD 3-Clause

    Arguments

    Type IntentOptional Attributes Name
    class(nurbs_volume), intent(in) :: this

    Return Value logical

procedure, public :: modify_Wc

Modify weights

  • private pure subroutine modify_Wc(this, W, num)

    Author
    Seyed Ali Ghasemi
    License
    BSD 3-Clause

    Arguments

    Type IntentOptional Attributes Name
    class(nurbs_volume), intent(inout) :: this
    real(kind=rk), intent(in) :: W
    integer, intent(in) :: num

procedure, public :: modify_Xc

Modify control points

  • private pure subroutine modify_Xc(this, X, num, dir)

    Author
    Seyed Ali Ghasemi
    License
    BSD 3-Clause

    Arguments

    Type IntentOptional Attributes Name
    class(nurbs_volume), intent(inout) :: this
    real(kind=rk), intent(in) :: X
    integer, intent(in) :: num
    integer, intent(in) :: dir

procedure, public :: nearest_point

Find the nearest point on the NURBS volume (Approximation)

  • private pure subroutine nearest_point(this, point_Xg, nearest_Xg, nearest_Xt, id)

    Author
    Seyed Ali Ghasemi
    License
    BSD 3-Clause

    Arguments

    Type IntentOptional Attributes Name
    class(nurbs_volume), intent(in) :: this
    real(kind=rk), intent(in) :: point_Xg(:)
    real(kind=rk), intent(out), optional, allocatable :: nearest_Xg(:)
    real(kind=rk), intent(out), optional, allocatable :: nearest_Xt(:)
    integer, intent(out), optional :: id

procedure, public :: nearest_point2

Find the nearest point on the NURBS volume (Minimization - Newton's method)

  • private impure subroutine nearest_point2(this, point_Xg, tol, maxit, nearest_Xt, nearest_Xg)

    Author
    Seyed Ali Ghasemi
    License
    BSD 3-Clause

    Arguments

    Type IntentOptional Attributes Name
    class(nurbs_volume), intent(inout) :: this
    real(kind=rk), intent(in) :: point_Xg(:)
    real(kind=rk), intent(in) :: tol
    integer, intent(in) :: maxit
    real(kind=rk), intent(out) :: nearest_Xt(3)
    real(kind=rk), intent(out), optional, allocatable :: nearest_Xg(:)

procedure, public :: put_to_nurbs

Put a shape to a NURBS volume

  • private pure subroutine put_to_nurbs(this, X, elemConn)

    Author
    Seyed Ali Ghasemi
    License
    BSD 3-Clause

    Arguments

    Type IntentOptional Attributes Name
    class(nurbs_volume), intent(inout) :: this
    real(kind=rk), intent(in), contiguous :: X(:,:)
    integer, intent(in), contiguous :: elemConn(:,:)

procedure, public :: remove_knots

Remove knots from the knot vector

  • private pure subroutine remove_knots(this, dir, Xth, r)

    Author
    Seyed Ali Ghasemi
    License
    BSD 3-Clause

    Arguments

    Type IntentOptional Attributes Name
    class(nurbs_volume), intent(inout) :: this
    integer, intent(in) :: dir
    real(kind=rk), intent(in), contiguous :: Xth(:)
    integer, intent(in), contiguous :: r(:)

procedure, public :: rotate_Xc

Rotate control points

  • private pure subroutine rotate_Xc(this, alpha, beta, theta)

    Author
    Seyed Ali Ghasemi
    License
    BSD 3-Clause

    Arguments

    Type IntentOptional Attributes Name
    class(nurbs_volume), intent(inout) :: this
    real(kind=rk), intent(in) :: alpha
    real(kind=rk), intent(in) :: beta
    real(kind=rk), intent(in) :: theta

procedure, public :: rotate_Xg

Rotate geometry points

  • private pure subroutine rotate_Xg(this, alpha, beta, theta)

    Author
    Seyed Ali Ghasemi
    License
    BSD 3-Clause

    Arguments

    Type IntentOptional Attributes Name
    class(nurbs_volume), intent(inout) :: this
    real(kind=rk), intent(in) :: alpha
    real(kind=rk), intent(in) :: beta
    real(kind=rk), intent(in) :: theta

generic, public :: set => set1, set2, set3, set4

Set NURBS volume

  • private pure subroutine set1(this, knot1, knot2, knot3, Xc, Wc)

    Author
    Seyed Ali Ghasemi
    License
    BSD 3-Clause

    Set control points and weights for the NURBS volume object.

    Arguments

    Type IntentOptional Attributes Name
    class(nurbs_volume), intent(inout) :: this
    real(kind=rk), intent(in), contiguous :: knot1(:)
    real(kind=rk), intent(in), contiguous :: knot2(:)
    real(kind=rk), intent(in), contiguous :: knot3(:)
    real(kind=rk), intent(in), contiguous :: Xc(:,:)
    real(kind=rk), intent(in), optional, contiguous :: Wc(:)
  • private pure subroutine set2(this, Xth_dir1, Xth_dir2, Xth_dir3, degree, continuity1, continuity2, continuity3, Xc, Wc)

    Author
    Seyed Ali Ghasemi
    License
    BSD 3-Clause

    Set control points and weights for the NURBS volume object.

    Arguments

    Type IntentOptional Attributes Name
    class(nurbs_volume), intent(inout) :: this
    real(kind=rk), intent(in), contiguous :: Xth_dir1(:)
    real(kind=rk), intent(in), contiguous :: Xth_dir2(:)
    real(kind=rk), intent(in), contiguous :: Xth_dir3(:)
    integer, intent(in), contiguous :: degree(:)
    integer, intent(in), contiguous :: continuity1(:)
    integer, intent(in), contiguous :: continuity2(:)
    integer, intent(in), contiguous :: continuity3(:)
    real(kind=rk), intent(in), contiguous :: Xc(:,:)
    real(kind=rk), intent(in), optional, contiguous :: Wc(:)
  • private pure subroutine set3(this, nc, Xc, Wc)

    Author
    Seyed Ali Ghasemi
    License
    BSD 3-Clause

    Set Bezier or Rational Bezier volume using control points and weights.

    Arguments

    Type IntentOptional Attributes Name
    class(nurbs_volume), intent(inout) :: this
    integer, intent(in), contiguous :: nc(:)
    real(kind=rk), intent(in), contiguous :: Xc(:,:)
    real(kind=rk), intent(in), optional, contiguous :: Wc(:)
  • private pure subroutine set4(this, degree, nc, Xc, Wc)

    Author
    Seyed Ali Ghasemi
    License
    BSD 3-Clause

    Arguments

    Type IntentOptional Attributes Name
    class(nurbs_volume), intent(inout) :: this
    integer, intent(in), contiguous :: degree(:)
    integer, intent(in), contiguous :: nc(:)
    real(kind=rk), intent(in), contiguous :: Xc(:,:)
    real(kind=rk), intent(in), optional, contiguous :: Wc(:)

procedure, public :: set1

Set knot vectors, control points and weights for the NURBS volume object

  • private pure subroutine set1(this, knot1, knot2, knot3, Xc, Wc)

    Author
    Seyed Ali Ghasemi
    License
    BSD 3-Clause

    Set control points and weights for the NURBS volume object.

    Arguments

    Type IntentOptional Attributes Name
    class(nurbs_volume), intent(inout) :: this
    real(kind=rk), intent(in), contiguous :: knot1(:)
    real(kind=rk), intent(in), contiguous :: knot2(:)
    real(kind=rk), intent(in), contiguous :: knot3(:)
    real(kind=rk), intent(in), contiguous :: Xc(:,:)
    real(kind=rk), intent(in), optional, contiguous :: Wc(:)

procedure, public :: set2

Set NURBS volume using nodes of parameter space, degree, continuity, control points and weights

  • private pure subroutine set2(this, Xth_dir1, Xth_dir2, Xth_dir3, degree, continuity1, continuity2, continuity3, Xc, Wc)

    Author
    Seyed Ali Ghasemi
    License
    BSD 3-Clause

    Set control points and weights for the NURBS volume object.

    Arguments

    Type IntentOptional Attributes Name
    class(nurbs_volume), intent(inout) :: this
    real(kind=rk), intent(in), contiguous :: Xth_dir1(:)
    real(kind=rk), intent(in), contiguous :: Xth_dir2(:)
    real(kind=rk), intent(in), contiguous :: Xth_dir3(:)
    integer, intent(in), contiguous :: degree(:)
    integer, intent(in), contiguous :: continuity1(:)
    integer, intent(in), contiguous :: continuity2(:)
    integer, intent(in), contiguous :: continuity3(:)
    real(kind=rk), intent(in), contiguous :: Xc(:,:)
    real(kind=rk), intent(in), optional, contiguous :: Wc(:)

procedure, public :: set3

Set Bezier or Rational Bezier volume using control points and weights

  • private pure subroutine set3(this, nc, Xc, Wc)

    Author
    Seyed Ali Ghasemi
    License
    BSD 3-Clause

    Set Bezier or Rational Bezier volume using control points and weights.

    Arguments

    Type IntentOptional Attributes Name
    class(nurbs_volume), intent(inout) :: this
    integer, intent(in), contiguous :: nc(:)
    real(kind=rk), intent(in), contiguous :: Xc(:,:)
    real(kind=rk), intent(in), optional, contiguous :: Wc(:)

procedure, public :: set4

Set NURBS volume using degree, number of control points, control points and weights

  • private pure subroutine set4(this, degree, nc, Xc, Wc)

    Author
    Seyed Ali Ghasemi
    License
    BSD 3-Clause

    Arguments

    Type IntentOptional Attributes Name
    class(nurbs_volume), intent(inout) :: this
    integer, intent(in), contiguous :: degree(:)
    integer, intent(in), contiguous :: nc(:)
    real(kind=rk), intent(in), contiguous :: Xc(:,:)
    real(kind=rk), intent(in), optional, contiguous :: Wc(:)

procedure, public :: set_C

Set a C-shape

  • private pure subroutine set_C(this, center, radius1, radius2, length)

    Author
    Seyed Ali Ghasemi
    License
    BSD 3-Clause

    Arguments

    Type IntentOptional Attributes Name
    class(nurbs_volume), intent(inout) :: this
    real(kind=rk), intent(in), contiguous :: center(:)
    real(kind=rk), intent(in) :: radius1
    real(kind=rk), intent(in) :: radius2
    real(kind=rk), intent(in) :: length

procedure, public :: set_elem

Set IGA element connectivity

  • private pure subroutine set_elem(this, elemConn)

    Author
    Seyed Ali Ghasemi
    License
    BSD 3-Clause

    Arguments

    Type IntentOptional Attributes Name
    class(nurbs_volume), intent(inout) :: this
    integer, intent(in), contiguous :: elemConn(:,:)

procedure, public :: set_elem_Xc_vis

Set connectivity for control points

  • private pure subroutine set_elem_Xc_vis(this, elemConn)

    Author
    Seyed Ali Ghasemi
    License
    BSD 3-Clause

    Arguments

    Type IntentOptional Attributes Name
    class(nurbs_volume), intent(inout) :: this
    integer, intent(in), contiguous :: elemConn(:,:)

procedure, public :: set_elem_Xg_vis

Set connectivity for geometry points

  • private pure subroutine set_elem_Xg_vis(this, elemConn)

    Author
    Seyed Ali Ghasemi
    License
    BSD 3-Clause

    Arguments

    Type IntentOptional Attributes Name
    class(nurbs_volume), intent(inout) :: this
    integer, intent(in), contiguous :: elemConn(:,:)

procedure, public :: set_half_ring

Set a half ring

  • private pure subroutine set_half_ring(this, center, radius1, radius2, length)

    Author
    Seyed Ali Ghasemi
    License
    BSD 3-Clause

    Arguments

    Type IntentOptional Attributes Name
    class(nurbs_volume), intent(inout) :: this
    real(kind=rk), intent(in), contiguous :: center(:)
    real(kind=rk), intent(in) :: radius1
    real(kind=rk), intent(in) :: radius2
    real(kind=rk), intent(in) :: length

procedure, public :: set_hexahedron

Set a hexahedron

  • private pure subroutine set_hexahedron(this, L, nc, Wc)

    Author
    Seyed Ali Ghasemi
    License
    BSD 3-Clause

    Arguments

    Type IntentOptional Attributes Name
    class(nurbs_volume), intent(inout) :: this
    real(kind=rk), intent(in), contiguous :: L(:)
    integer, intent(in), contiguous :: nc(:)
    real(kind=rk), intent(in), optional, contiguous :: Wc(:)

procedure, public :: set_ring

Set a ring

  • private pure subroutine set_ring(this, center, radius1, radius2, length)

    Author
    Seyed Ali Ghasemi
    License
    BSD 3-Clause

    Arguments

    Type IntentOptional Attributes Name
    class(nurbs_volume), intent(inout) :: this
    real(kind=rk), intent(in), contiguous :: center(:)
    real(kind=rk), intent(in) :: radius1
    real(kind=rk), intent(in) :: radius2
    real(kind=rk), intent(in) :: length

procedure, public :: show

Show the NURBS object using PyVista

  • private impure subroutine show(this, vtkfile_Xc, vtkfile_Xg)

    Author
    Seyed Ali Ghasemi
    License
    BSD 3-Clause

    Arguments

    Type IntentOptional Attributes Name
    class(nurbs_volume), intent(inout) :: this
    character(len=*), intent(in) :: vtkfile_Xc
    character(len=*), intent(in) :: vtkfile_Xg

procedure, public :: translate_Xc

Translate control points

  • private pure subroutine translate_Xc(this, vec)

    Author
    Seyed Ali Ghasemi
    License
    BSD 3-Clause

    Arguments

    Type IntentOptional Attributes Name
    class(nurbs_volume), intent(inout) :: this
    real(kind=rk), intent(in) :: vec(:)

procedure, public :: translate_Xg

Translate geometry points

  • private pure subroutine translate_Xg(this, vec)

    Author
    Seyed Ali Ghasemi
    License
    BSD 3-Clause

    Arguments

    Type IntentOptional Attributes Name
    class(nurbs_volume), intent(inout) :: this
    real(kind=rk), intent(in) :: vec(:)

procedure, private :: basis_scalar

Compute the basis functions of the NURBS volume

  • private pure subroutine basis_scalar(this, Xt, Tgc)

    Author
    Seyed Ali Ghasemi
    License
    BSD 3-Clause

    Arguments

    Type IntentOptional Attributes Name
    class(nurbs_volume), intent(inout) :: this
    real(kind=rk), intent(in), contiguous :: Xt(:)
    real(kind=rk), intent(out), allocatable :: Tgc(:)

procedure, private :: basis_vector

Compute the basis functions of the NURBS volume

  • private pure subroutine basis_vector(this, res1, res2, res3, Xt1, Xt2, Xt3, Tgc)

    Author
    Seyed Ali Ghasemi
    License
    BSD 3-Clause

    Arguments

    Type IntentOptional Attributes Name
    class(nurbs_volume), intent(inout) :: this
    integer, intent(in), optional :: res1
    integer, intent(in), optional :: res2
    integer, intent(in), optional :: res3
    real(kind=rk), intent(in), optional, contiguous :: Xt1(:)
    real(kind=rk), intent(in), optional, contiguous :: Xt2(:)
    real(kind=rk), intent(in), optional, contiguous :: Xt3(:)
    real(kind=rk), intent(out), allocatable :: Tgc(:,:)

procedure, private :: derivative2_scalar

Compute the second derivative of the NURBS volume

  • private pure subroutine derivative2_scalar(this, Xt, d2Tgc, dTgc, Tgc)

    Author
    Seyed Ali Ghasemi
    License
    BSD 3-Clause

    Arguments

    Type IntentOptional Attributes Name
    class(nurbs_volume), intent(inout) :: this
    real(kind=rk), intent(in), contiguous :: Xt(:)
    real(kind=rk), intent(out), allocatable :: d2Tgc(:,:)
    real(kind=rk), intent(out), optional, allocatable :: dTgc(:,:)
    real(kind=rk), intent(out), optional, allocatable :: Tgc(:)

procedure, private :: derivative2_vector

Compute the second derivative of the NURBS volume

  • private pure subroutine derivative2_vector(this, res1, res2, res3, Xt1, Xt2, Xt3, d2Tgc, dTgc, Tgc)

    Author
    Seyed Ali Ghasemi
    License
    BSD 3-Clause

    Arguments

    Type IntentOptional Attributes Name
    class(nurbs_volume), intent(inout) :: this
    integer, intent(in), optional :: res1
    integer, intent(in), optional :: res2
    integer, intent(in), optional :: res3
    real(kind=rk), intent(in), optional, contiguous :: Xt1(:)
    real(kind=rk), intent(in), optional, contiguous :: Xt2(:)
    real(kind=rk), intent(in), optional, contiguous :: Xt3(:)
    real(kind=rk), intent(out), allocatable :: d2Tgc(:,:,:)
    real(kind=rk), intent(out), optional, allocatable :: dTgc(:,:,:)
    real(kind=rk), intent(out), optional, allocatable :: Tgc(:,:)

procedure, private :: derivative_scalar

Compute the derivative of the NURBS volume

  • private pure subroutine derivative_scalar(this, Xt, dTgc, Tgc, elem)

    Author
    Seyed Ali Ghasemi
    License
    BSD 3-Clause

    Arguments

    Type IntentOptional Attributes Name
    class(nurbs_volume), intent(inout) :: this
    real(kind=rk), intent(in), contiguous :: Xt(:)
    real(kind=rk), intent(out), allocatable :: dTgc(:,:)
    real(kind=rk), intent(out), optional, allocatable :: Tgc(:)
    integer, intent(in), optional :: elem(:)

procedure, private :: derivative_vector

Compute the derivative of the NURBS volume

  • private pure subroutine derivative_vector(this, res1, res2, res3, Xt1, Xt2, Xt3, dTgc, Tgc)

    Author
    Seyed Ali Ghasemi
    License
    BSD 3-Clause

    Arguments

    Type IntentOptional Attributes Name
    class(nurbs_volume), intent(inout) :: this
    integer, intent(in), optional :: res1
    integer, intent(in), optional :: res2
    integer, intent(in), optional :: res3
    real(kind=rk), intent(in), optional, contiguous :: Xt1(:)
    real(kind=rk), intent(in), optional, contiguous :: Xt2(:)
    real(kind=rk), intent(in), optional, contiguous :: Xt3(:)
    real(kind=rk), intent(out), allocatable :: dTgc(:,:,:)
    real(kind=rk), intent(out), optional, allocatable :: Tgc(:,:)

procedure, private :: get_Wc_all

Get all weights

  • private pure function get_Wc_all(this) result(Wc)

    Author
    Seyed Ali Ghasemi
    License
    BSD 3-Clause

    Arguments

    Type IntentOptional Attributes Name
    class(nurbs_volume), intent(in) :: this

    Return Value real(kind=rk), allocatable, (:)

procedure, private :: get_Wci

Get i-th weight

  • private pure function get_Wci(this, n) result(Wc)

    Author
    Seyed Ali Ghasemi
    License
    BSD 3-Clause

    Arguments

    Type IntentOptional Attributes Name
    class(nurbs_volume), intent(in) :: this
    integer, intent(in) :: n

    Return Value real(kind=rk)

procedure, private :: get_Xc_all

Get all control points

  • private pure function get_Xc_all(this) result(Xc)

    Author
    Seyed Ali Ghasemi
    License
    BSD 3-Clause

    Arguments

    Type IntentOptional Attributes Name
    class(nurbs_volume), intent(in) :: this

    Return Value real(kind=rk), allocatable, (:,:)

procedure, private :: get_Xci

Get i-th control point

  • private pure function get_Xci(this, n) result(Xc)

    Author
    Seyed Ali Ghasemi
    License
    BSD 3-Clause

    Arguments

    Type IntentOptional Attributes Name
    class(nurbs_volume), intent(in) :: this
    integer, intent(in) :: n

    Return Value real(kind=rk), allocatable, (:)

procedure, private :: get_Xcid

Get i-th control point in a specific direction

  • private pure function get_Xcid(this, n, dir) result(Xc)

    Author
    Seyed Ali Ghasemi
    License
    BSD 3-Clause

    Arguments

    Type IntentOptional Attributes Name
    class(nurbs_volume), intent(in) :: this
    integer, intent(in) :: n
    integer, intent(in) :: dir

    Return Value real(kind=rk)

procedure, private :: get_Xg_all

Get all geometry points

  • private pure function get_Xg_all(this) result(Xg)

    Author
    Seyed Ali Ghasemi
    License
    BSD 3-Clause

    Arguments

    Type IntentOptional Attributes Name
    class(nurbs_volume), intent(in) :: this

    Return Value real(kind=rk), allocatable, (:,:)

procedure, private :: get_Xgi

Get i-th geometry point

  • private pure function get_Xgi(this, n) result(Xg)

    Author
    Seyed Ali Ghasemi
    License
    BSD 3-Clause

    Arguments

    Type IntentOptional Attributes Name
    class(nurbs_volume), intent(in) :: this
    integer, intent(in) :: n

    Return Value real(kind=rk), allocatable, (:)

procedure, private :: get_Xgid

Get i-th geometry point in a specific direction

  • private pure function get_Xgid(this, n, dir) result(Xg)

    Author
    Seyed Ali Ghasemi
    License
    BSD 3-Clause

    Arguments

    Type IntentOptional Attributes Name
    class(nurbs_volume), intent(in) :: this
    integer, intent(in) :: n
    integer, intent(in) :: dir

    Return Value real(kind=rk)

procedure, private :: get_degree_all

Get degree of the NURBS volume in all directions

  • private pure function get_degree_all(this) result(degree)

    Author
    Seyed Ali Ghasemi
    License
    BSD 3-Clause

    Arguments

    Type IntentOptional Attributes Name
    class(nurbs_volume), intent(in) :: this

    Return Value integer, (3)

procedure, private :: get_degree_dir

Get degree of the NURBS volume in a specific direction

  • private pure function get_degree_dir(this, dir) result(degree)

    Author
    Seyed Ali Ghasemi
    License
    BSD 3-Clause

    Arguments

    Type IntentOptional Attributes Name
    class(nurbs_volume), intent(in) :: this
    integer, intent(in) :: dir

    Return Value integer

procedure, private :: get_knot_all

Get all knot vectors

  • private pure function get_knot_all(this, dir) result(knot)

    Author
    Seyed Ali Ghasemi
    License
    BSD 3-Clause

    Arguments

    Type IntentOptional Attributes Name
    class(nurbs_volume), intent(in) :: this
    integer, intent(in) :: dir

    Return Value real(kind=rk), allocatable, (:)

procedure, private :: get_knoti

Get i-th knot value

  • private pure function get_knoti(this, dir, i) result(knot)

    Author
    Seyed Ali Ghasemi
    License
    BSD 3-Clause

    Arguments

    Type IntentOptional Attributes Name
    class(nurbs_volume), intent(in) :: this
    integer, intent(in) :: dir
    integer, intent(in) :: i

    Return Value real(kind=rk)

procedure, private :: get_nc_all

Get number of control points in all directions

  • private pure function get_nc_all(this) result(nc)

    Author
    Seyed Ali Ghasemi
    License
    BSD 3-Clause

    Arguments

    Type IntentOptional Attributes Name
    class(nurbs_volume), intent(in) :: this

    Return Value integer, (3)

procedure, private :: get_nc_dir

Get number of control points in a specific direction

  • private pure function get_nc_dir(this, dir) result(nc)

    Author
    Seyed Ali Ghasemi
    License
    BSD 3-Clause

    Arguments

    Type IntentOptional Attributes Name
    class(nurbs_volume), intent(in) :: this
    integer, intent(in) :: dir

    Return Value integer