forcad_nurbs_surface Module

This module defines the 'nurbs_surface' type for representing a Non-Uniform Rational B-Spline (NURBS) surface.


Uses

  • module~~forcad_nurbs_surface~~UsesGraph module~forcad_nurbs_surface forcad_nurbs_surface module~forcad_utils forcad_utils module~forcad_nurbs_surface->module~forcad_utils stdlib_quadrature stdlib_quadrature module~forcad_utils->stdlib_quadrature

Used by

  • module~~forcad_nurbs_surface~~UsedByGraph module~forcad_nurbs_surface forcad_nurbs_surface module~forcad forcad module~forcad->module~forcad_nurbs_surface program~compute_area compute_area program~compute_area->module~forcad program~compute_length compute_length program~compute_length->module~forcad program~compute_volume compute_volume program~compute_volume->module~forcad program~example1_curve example1_curve program~example1_curve->module~forcad program~example3_surface example3_surface program~example3_surface->module~forcad program~example3_volume example3_volume program~example3_volume->module~forcad program~example_nurbs_curve example_nurbs_curve program~example_nurbs_curve->module~forcad program~example_nurbs_surface example_nurbs_surface program~example_nurbs_surface->module~forcad program~example_nurbs_volume example_nurbs_volume program~example_nurbs_volume->module~forcad program~example_ppm1 example_ppm1 program~example_ppm1->module~forcad program~example_ppm2 example_ppm2 program~example_ppm2->module~forcad program~example_ppm3 example_ppm3 program~example_ppm3->module~forcad program~example_put_to_nurbs example_put_to_nurbs program~example_put_to_nurbs->module~forcad program~nearest_point_1d nearest_point_1d program~nearest_point_1d->module~forcad program~nearest_point_2d nearest_point_2d program~nearest_point_2d->module~forcad program~nearest_point_2d_bench nearest_point_2d_bench program~nearest_point_2d_bench->module~forcad program~nearest_point_3d nearest_point_3d program~nearest_point_3d->module~forcad program~shape_c_1d shape_C_1d program~shape_c_1d->module~forcad program~shape_c_2d shape_C_2d program~shape_c_2d->module~forcad program~shape_c_3d shape_C_3d program~shape_c_3d->module~forcad program~shape_circle shape_circle program~shape_circle->module~forcad program~shape_half_circle shape_half_circle program~shape_half_circle->module~forcad program~shape_half_ring_2d shape_half_ring_2d program~shape_half_ring_2d->module~forcad program~shape_half_ring_3d shape_half_ring_3d program~shape_half_ring_3d->module~forcad program~shape_hexahedron shape_hexahedron program~shape_hexahedron->module~forcad program~shape_ring_2d shape_ring_2d program~shape_ring_2d->module~forcad program~shape_ring_3d shape_ring_3d program~shape_ring_3d->module~forcad program~shape_tetragon shape_tetragon program~shape_tetragon->module~forcad

Interfaces

private interface compute_Tgc

  • private pure function compute_Tgc_bspline_2d_scalar(f_Xt, f_knot1, f_knot2, f_degree, f_nc) result(f_Tgc)

    Arguments

    Type IntentOptional Attributes Name
    real(kind=rk), intent(in), contiguous :: f_Xt(:)
    real(kind=rk), intent(in), contiguous :: f_knot1(:)
    real(kind=rk), intent(in), contiguous :: f_knot2(:)
    integer, intent(in) :: f_degree(2)
    integer, intent(in) :: f_nc(2)

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

  • private pure function compute_Tgc_bspline_2d_vector(f_Xt, f_knot1, f_knot2, f_degree, f_nc, f_ng) result(f_Tgc)

    Arguments

    Type IntentOptional Attributes Name
    real(kind=rk), intent(in), contiguous :: f_Xt(:,:)
    real(kind=rk), intent(in), contiguous :: f_knot1(:)
    real(kind=rk), intent(in), contiguous :: f_knot2(:)
    integer, intent(in) :: f_degree(2)
    integer, intent(in) :: f_nc(2)
    integer, intent(in) :: f_ng(2)

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

  • private pure function compute_Tgc_nurbs_2d_scalar(f_Xt, f_knot1, f_knot2, f_degree, f_nc, f_Wc) result(f_Tgc)

    Arguments

    Type IntentOptional Attributes Name
    real(kind=rk), intent(in), contiguous :: f_Xt(:)
    real(kind=rk), intent(in), contiguous :: f_knot1(:)
    real(kind=rk), intent(in), contiguous :: f_knot2(:)
    integer, intent(in) :: f_degree(2)
    integer, intent(in) :: f_nc(2)
    real(kind=rk), intent(in), contiguous :: f_Wc(:)

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

  • private pure function compute_Tgc_nurbs_2d_vector(f_Xt, f_knot1, f_knot2, f_degree, f_nc, f_ng, f_Wc) result(f_Tgc)

    Arguments

    Type IntentOptional Attributes Name
    real(kind=rk), intent(in), contiguous :: f_Xt(:,:)
    real(kind=rk), intent(in), contiguous :: f_knot1(:)
    real(kind=rk), intent(in), contiguous :: f_knot2(:)
    integer, intent(in) :: f_degree(2)
    integer, intent(in) :: f_nc(2)
    integer, intent(in) :: f_ng(2)
    real(kind=rk), intent(in), contiguous :: f_Wc(:)

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

private interface compute_Xg

  • private pure function compute_Xg_bspline_2d(f_Xt, f_knot1, f_knot2, f_degree, f_nc, f_ng, f_Xc) result(f_Xg)

    Arguments

    Type IntentOptional Attributes Name
    real(kind=rk), intent(in), contiguous :: f_Xt(:,:)
    real(kind=rk), intent(in), contiguous :: f_knot1(:)
    real(kind=rk), intent(in), contiguous :: f_knot2(:)
    integer, intent(in) :: f_degree(2)
    integer, intent(in) :: f_nc(2)
    integer, intent(in) :: f_ng(2)
    real(kind=rk), intent(in), contiguous :: f_Xc(:,:)

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

  • private pure function compute_Xg_bspline_2d_1point(f_Xt, f_knot1, f_knot2, f_degree, f_nc, f_Xc) result(f_Xg)

    Arguments

    Type IntentOptional Attributes Name
    real(kind=rk), intent(in), contiguous :: f_Xt(:)
    real(kind=rk), intent(in), contiguous :: f_knot1(:)
    real(kind=rk), intent(in), contiguous :: f_knot2(:)
    integer, intent(in) :: f_degree(2)
    integer, intent(in) :: f_nc(2)
    real(kind=rk), intent(in), contiguous :: f_Xc(:,:)

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

  • private pure function compute_Xg_nurbs_2d(f_Xt, f_knot1, f_knot2, f_degree, f_nc, f_ng, f_Xc, f_Wc) result(f_Xg)

    Arguments

    Type IntentOptional Attributes Name
    real(kind=rk), intent(in), contiguous :: f_Xt(:,:)
    real(kind=rk), intent(in), contiguous :: f_knot1(:)
    real(kind=rk), intent(in), contiguous :: f_knot2(:)
    integer, intent(in) :: f_degree(2)
    integer, intent(in) :: f_nc(2)
    integer, intent(in) :: f_ng(2)
    real(kind=rk), intent(in), contiguous :: f_Xc(:,:)
    real(kind=rk), intent(in), contiguous :: f_Wc(:)

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

  • private pure function compute_Xg_nurbs_2d_1point(f_Xt, f_knot1, f_knot2, f_degree, f_nc, f_Xc, f_Wc) result(f_Xg)

    Arguments

    Type IntentOptional Attributes Name
    real(kind=rk), intent(in), contiguous :: f_Xt(:)
    real(kind=rk), intent(in), contiguous :: f_knot1(:)
    real(kind=rk), intent(in), contiguous :: f_knot2(:)
    integer, intent(in) :: f_degree(2)
    integer, intent(in) :: f_nc(2)
    real(kind=rk), intent(in), contiguous :: f_Xc(:,:)
    real(kind=rk), intent(in), contiguous :: f_Wc(:)

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

private interface compute_d2Tgc

  • private pure subroutine compute_d2Tgc_bspline_2d_scalar(f_Xt, f_knot1, f_knot2, f_degree, nc, f_d2Tgc, f_dTgc, f_Tgc)

    Arguments

    Type IntentOptional Attributes Name
    real(kind=rk), intent(in), contiguous :: f_Xt(:)
    real(kind=rk), intent(in), contiguous :: f_knot1(:)
    real(kind=rk), intent(in), contiguous :: f_knot2(:)
    integer, intent(in) :: f_degree(2)
    integer, intent(in) :: nc(2)
    real(kind=rk), intent(out), allocatable :: f_d2Tgc(:,:)
    real(kind=rk), intent(out), allocatable :: f_dTgc(:,:)
    real(kind=rk), intent(out), allocatable :: f_Tgc(:)
  • private pure subroutine compute_d2Tgc_bspline_2d_vector(f_Xt, f_knot1, f_knot2, f_degree, nc, f_ng, f_d2Tgc, f_dTgc, f_Tgc)

    Arguments

    Type IntentOptional Attributes Name
    real(kind=rk), intent(in), contiguous :: f_Xt(:,:)
    real(kind=rk), intent(in), contiguous :: f_knot1(:)
    real(kind=rk), intent(in), contiguous :: f_knot2(:)
    integer, intent(in) :: f_degree(2)
    integer, intent(in) :: nc(2)
    integer, intent(in) :: f_ng(2)
    real(kind=rk), intent(out), allocatable :: f_d2Tgc(:,:,:)
    real(kind=rk), intent(out), allocatable :: f_dTgc(:,:,:)
    real(kind=rk), intent(out), allocatable :: f_Tgc(:,:)
  • private pure subroutine compute_d2Tgc_nurbs_2d_scalar(f_Xt, f_knot1, f_knot2, f_degree, f_nc, f_Wc, f_d2Tgc, f_dTgc, f_Tgc)

    Arguments

    Type IntentOptional Attributes Name
    real(kind=rk), intent(in), contiguous :: f_Xt(:)
    real(kind=rk), intent(in), contiguous :: f_knot1(:)
    real(kind=rk), intent(in), contiguous :: f_knot2(:)
    integer, intent(in) :: f_degree(2)
    integer, intent(in) :: f_nc(2)
    real(kind=rk), intent(in), contiguous :: f_Wc(:)
    real(kind=rk), intent(out), allocatable :: f_d2Tgc(:,:)
    real(kind=rk), intent(out), allocatable :: f_dTgc(:,:)
    real(kind=rk), intent(out), allocatable :: f_Tgc(:)
  • private pure subroutine compute_d2Tgc_nurbs_2d_vector(f_Xt, f_knot1, f_knot2, f_degree, f_nc, f_ng, f_Wc, f_d2Tgc, f_dTgc, f_Tgc)

    Arguments

    Type IntentOptional Attributes Name
    real(kind=rk), intent(in), contiguous :: f_Xt(:,:)
    real(kind=rk), intent(in), contiguous :: f_knot1(:)
    real(kind=rk), intent(in), contiguous :: f_knot2(:)
    integer, intent(in) :: f_degree(2)
    integer, intent(in) :: f_nc(2)
    integer, intent(in) :: f_ng(2)
    real(kind=rk), intent(in), contiguous :: f_Wc(:)
    real(kind=rk), intent(out), allocatable :: f_d2Tgc(:,:,:)
    real(kind=rk), intent(out), allocatable :: f_dTgc(:,:,:)
    real(kind=rk), intent(out), allocatable :: f_Tgc(:,:)

private interface compute_dTgc

  • private pure subroutine compute_dTgc_bspline_2d_scalar(f_Xt, f_knot1, f_knot2, f_degree, nc, f_dTgc, f_Tgc, elem)

    Arguments

    Type IntentOptional Attributes Name
    real(kind=rk), intent(in), contiguous :: f_Xt(:)
    real(kind=rk), intent(in), contiguous :: f_knot1(:)
    real(kind=rk), intent(in), contiguous :: f_knot2(:)
    integer, intent(in) :: f_degree(2)
    integer, intent(in) :: nc(2)
    real(kind=rk), intent(out), allocatable :: f_dTgc(:,:)
    real(kind=rk), intent(out), allocatable :: f_Tgc(:)
    integer, intent(in) :: elem(:)
  • private pure subroutine compute_dTgc_bspline_2d_vector(f_Xt, f_knot1, f_knot2, f_degree, nc, f_ng, f_dTgc, f_Tgc)

    Arguments

    Type IntentOptional Attributes Name
    real(kind=rk), intent(in), contiguous :: f_Xt(:,:)
    real(kind=rk), intent(in), contiguous :: f_knot1(:)
    real(kind=rk), intent(in), contiguous :: f_knot2(:)
    integer, intent(in) :: f_degree(2)
    integer, intent(in) :: nc(2)
    integer, intent(in) :: f_ng(2)
    real(kind=rk), intent(out), allocatable :: f_dTgc(:,:,:)
    real(kind=rk), intent(out), allocatable :: f_Tgc(:,:)
  • private pure subroutine compute_dTgc_nurbs_2d_scalar(f_Xt, f_knot1, f_knot2, f_degree, f_nc, f_Wc, f_dTgc, f_Tgc, elem)

    Arguments

    Type IntentOptional Attributes Name
    real(kind=rk), intent(in), contiguous :: f_Xt(:)
    real(kind=rk), intent(in), contiguous :: f_knot1(:)
    real(kind=rk), intent(in), contiguous :: f_knot2(:)
    integer, intent(in) :: f_degree(2)
    integer, intent(in) :: f_nc(2)
    real(kind=rk), intent(in), contiguous :: f_Wc(:)
    real(kind=rk), intent(out), allocatable :: f_dTgc(:,:)
    real(kind=rk), intent(out), allocatable :: f_Tgc(:)
    integer, intent(in) :: elem(:)
  • private pure subroutine compute_dTgc_nurbs_2d_vector(f_Xt, f_knot1, f_knot2, f_degree, f_nc, f_ng, f_Wc, f_dTgc, f_Tgc)

    Arguments

    Type IntentOptional Attributes Name
    real(kind=rk), intent(in), contiguous :: f_Xt(:,:)
    real(kind=rk), intent(in), contiguous :: f_knot1(:)
    real(kind=rk), intent(in), contiguous :: f_knot2(:)
    integer, intent(in) :: f_degree(2)
    integer, intent(in) :: f_nc(2)
    integer, intent(in) :: f_ng(2)
    real(kind=rk), intent(in), contiguous :: f_Wc(:)
    real(kind=rk), intent(out), allocatable :: f_dTgc(:,:,:)
    real(kind=rk), intent(out), allocatable :: f_Tgc(:,:)

interface

  • private pure function nearest_point_help_2d(f_ng, f_Xg, f_point_Xg) result(f_distances)

    Arguments

    Type IntentOptional Attributes Name
    integer, intent(in) :: f_ng(2)
    real(kind=rk), intent(in), contiguous :: f_Xg(:,:)
    real(kind=rk), intent(in), contiguous :: f_point_Xg(:)

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


Derived Types

type, public ::  nurbs_surface

Components

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

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

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

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

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

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

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

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

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)])

integer, private :: degree(2)

Degree (order) of the surface

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)

integer, private :: nc(2)

Number of control points in each direction

integer, private :: ng(2)

Number of geometry points in each direction

Type-Bound Procedures

procedure, public :: ansatz

Compute the shape functions, derivative of shape functions and dA

Read more…
generic, public :: basis => basis_vector, basis_scalar

Compute the basis functions of the NURBS surface

Read more…
procedure, public :: cmp_Xg

Compute geometry points

Read more…
procedure, public :: cmp_area

Compute the area of the NURBS surface

Read more…
procedure, public :: cmp_degree

Compute degree of the NURBS surface

Read more…
procedure, public :: cmp_elem

Generate IGA element connectivity

Read more…
procedure, public :: cmp_elem_Xc_vis

Generate connectivity for control points

Read more…
procedure, public :: cmp_elem_Xg_vis

Generate connectivity for geometry points

Read more…
procedure, public :: cmp_nc

Compute number of required control points

Read more…
procedure, public :: create

Generate geometry points

Read more…
generic, public :: derivative => derivative_vector, derivative_scalar

Compute the derivative of the NURBS surface

Read more…
generic, public :: derivative2 => derivative2_vector, derivative2_scalar

Compute the second derivative of the NURBS surface

Read more…
procedure, public :: elevate_degree

Elevate degree

Read more…
procedure, public :: export_Xc

Export control points to VTK file

Read more…
procedure, public :: export_Xg

Export geometry points to VTK file

Read more…
procedure, public :: finalize

Finalize the NURBS surface object

Read more…
generic, public :: get_Wc => get_Wc_all, get_Wci

Get weights

Read more…
generic, public :: get_Xc => get_Xc_all, get_Xci, get_Xcid

Get control points

Read more…
generic, public :: get_Xg => get_Xg_all, get_Xgi, get_Xgid

Get geometry points

Read more…
procedure, public :: get_Xt

Get parameter values

Read more…
procedure, public :: get_continuity

Compute and return the continuity of the NURBS surface

Read more…
generic, public :: get_degree => get_degree_all, get_degree_dir

Get degree of the NURBS surface

Read more…
procedure, public :: get_elem

Get IGA element connectivity

Read more…
procedure, public :: get_elem_Xc_vis

Get connectivity for control points

Read more…
procedure, public :: get_elem_Xg_vis

Get connectivity for geometry points

Read more…
generic, public :: get_knot => get_knoti, get_knot_all

Get knot vector

Read more…
procedure, public :: get_multiplicity

Compute and return the multiplicity of the knot vector

Read more…
generic, public :: get_nc => get_nc_all, get_nc_dir

Get number of control points

Read more…
procedure, public :: get_ng

Get number of geometry points

Read more…
procedure, public :: insert_knots

Insert knots into the knot vector

Read more…
procedure, public :: is_rational

Check if the NURBS surface is rational

Read more…
procedure, public :: modify_Wc

Modify weights

Read more…
procedure, public :: modify_Xc

Modify control points

Read more…
procedure, public :: nearest_point

Find the nearest point on the NURBS surface (Approximation)

Read more…
procedure, public :: nearest_point2

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

Read more…
procedure, public :: remove_knots

Remove knots from the knot vector

Read more…
procedure, public :: rotate_Xc

Rotate control points

Read more…
procedure, public :: rotate_Xg

Rotate geometry points

Read more…
generic, public :: set => set1, set2, set3, set4

Set NURBS surface

Read more…
procedure, public :: set1

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

Read more…
procedure, public :: set2

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

Read more…
procedure, public :: set3

Set Bezier or Rational Bezier surface using control points and weights

Read more…
procedure, public :: set4

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

Read more…
procedure, public :: set_C

Set a C-shape

Read more…
procedure, public :: set_elem

Set IGA element connectivity

Read more…
procedure, public :: set_elem_Xc_vis

Set connectivity for control points

Read more…
procedure, public :: set_elem_Xg_vis

Set connectivity for geometry points

Read more…
procedure, public :: set_half_ring

Set a half ring

Read more…
procedure, public :: set_ring

Set a ring

Read more…
procedure, public :: set_tetragon

Set a tetragon

Read more…
procedure, public :: show

Show the NURBS object using PyVista

Read more…
procedure, public :: translate_Xc

Translate control points

Read more…
procedure, public :: translate_Xg

Translate geometry points

Read more…
procedure, private :: basis_scalar

Compute the basis functions of the NURBS surface

Read more…
procedure, private :: basis_vector

Compute the basis functions of the NURBS surface

Read more…
procedure, private :: derivative2_scalar

Compute the second derivative of the NURBS surface

Read more…
procedure, private :: derivative2_vector

Compute the second derivative of the NURBS surface

Read more…
procedure, private :: derivative_scalar

Compute the derivative of the NURBS surface

Read more…
procedure, private :: derivative_vector

Compute the derivative of the NURBS surface

Read more…
procedure, private :: get_Wc_all

Get all weights

Read more…
procedure, private :: get_Wci

Get i-th weight

Read more…
procedure, private :: get_Xc_all

Get all control points

Read more…
procedure, private :: get_Xci

Get i-th control point

Read more…
procedure, private :: get_Xcid

Get i-th control point in a specific direction

Read more…
procedure, private :: get_Xg_all

Get all geometry points

Read more…
procedure, private :: get_Xgi

Get i-th geometry point

Read more…
procedure, private :: get_Xgid

Get i-th geometry point in a specific direction

Read more…
procedure, private :: get_degree_all

Get degree of the NURBS surface in both directions

Read more…
procedure, private :: get_degree_dir

Get degree of the NURBS surface in a specific direction

Read more…
procedure, private :: get_knot_all

Get all knot vectors

Read more…
procedure, private :: get_knoti

Get i-th knot value

Read more…
procedure, private :: get_nc_all

Get number of control points in all directions

Read more…
procedure, private :: get_nc_dir

Get number of control points in a specific direction

Read more…

Functions

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

Author
Seyed Ali Ghasemi
License
BSD 3-Clause

Arguments

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

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

private pure function cmp_elem(this) result(elemConn)

Author
Seyed Ali Ghasemi
License
BSD 3-Clause

Arguments

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

Return Value integer, allocatable, (:,:)

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_surface), intent(in) :: this
integer, intent(in), optional, contiguous :: p(:)

Return Value integer, allocatable, (:,:)

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_surface), intent(in) :: this
integer, intent(in), optional, contiguous :: p(:)

Return Value integer, allocatable, (:,:)

private pure function get_Wc_all(this) result(Wc)

Author
Seyed Ali Ghasemi
License
BSD 3-Clause

Arguments

Type IntentOptional Attributes Name
class(nurbs_surface), 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_surface), intent(in) :: this
integer, intent(in) :: n

Return Value real(kind=rk)

private pure function get_Xc_all(this) result(Xc)

Author
Seyed Ali Ghasemi
License
BSD 3-Clause

Arguments

Type IntentOptional Attributes Name
class(nurbs_surface), 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_surface), 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_surface), intent(in) :: this
integer, intent(in) :: n
integer, intent(in) :: dir

Return Value real(kind=rk)

private pure function get_Xg_all(this) result(Xg)

Author
Seyed Ali Ghasemi
License
BSD 3-Clause

Arguments

Type IntentOptional Attributes Name
class(nurbs_surface), 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_surface), 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_surface), intent(in) :: this
integer, intent(in) :: n
integer, intent(in) :: dir

Return Value real(kind=rk)

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

Author
Seyed Ali Ghasemi
License
BSD 3-Clause

Arguments

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

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

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

Author
Seyed Ali Ghasemi
License
BSD 3-Clause

Arguments

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

Return Value integer, allocatable, (:)

private pure function get_degree_all(this) result(degree)

Author
Seyed Ali Ghasemi
License
BSD 3-Clause

Arguments

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

Return Value integer, (2)

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_surface), intent(in) :: this
integer, intent(in) :: dir

Return Value integer

private pure function get_elem(this) result(elemConn)

Author
Seyed Ali Ghasemi
License
BSD 3-Clause

Arguments

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

Return Value integer, allocatable, (:,:)

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_surface), intent(in) :: this

Return Value integer, allocatable, (:,:)

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_surface), intent(in) :: this

Return Value integer, allocatable, (:,:)

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_surface), intent(in) :: this
integer, intent(in) :: dir

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

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_surface), intent(in) :: this
integer, intent(in) :: dir
integer, intent(in) :: i

Return Value real(kind=rk)

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

Author
Seyed Ali Ghasemi
License
BSD 3-Clause

Arguments

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

Return Value integer, allocatable, (:)

private pure function get_nc_all(this) result(nc)

Author
Seyed Ali Ghasemi
License
BSD 3-Clause

Arguments

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

Return Value integer, (2)

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_surface), intent(in) :: this
integer, intent(in) :: dir

Return Value integer

private pure function get_ng(this) result(ng)

Author
Seyed Ali Ghasemi
License
BSD 3-Clause

Arguments

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

Return Value integer, (2)

private pure function is_rational(this) result(r)

Author
Seyed Ali Ghasemi
License
BSD 3-Clause

Arguments

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

Return Value logical


Subroutines

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

Author
Seyed Ali Ghasemi
License
BSD 3-Clause

Arguments

Type IntentOptional Attributes Name
class(nurbs_surface), 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) :: dA

private pure subroutine basis_scalar(this, Xt, Tgc)

Author
Seyed Ali Ghasemi
License
BSD 3-Clause

Arguments

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

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

Author
Seyed Ali Ghasemi
License
BSD 3-Clause

Arguments

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

private pure subroutine cmp_area(this, area)

Author
Seyed Ali Ghasemi
License
BSD 3-Clause

Arguments

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

private pure subroutine cmp_degree(this, dir)

Author
Seyed Ali Ghasemi
License
BSD 3-Clause

Arguments

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

private pure subroutine cmp_nc(this, dir)

Author
Seyed Ali Ghasemi
License
BSD 3-Clause

Arguments

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

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

Author
Seyed Ali Ghasemi
License
BSD 3-Clause

Arguments

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

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_surface), 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(:)

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

Author
Seyed Ali Ghasemi
License
BSD 3-Clause

Arguments

Type IntentOptional Attributes Name
class(nurbs_surface), intent(inout) :: this
integer, intent(in), optional :: res1
integer, intent(in), optional :: res2
real(kind=rk), intent(in), optional, contiguous :: Xt1(:)
real(kind=rk), intent(in), optional, contiguous :: Xt2(:)
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 derivative_scalar(this, Xt, dTgc, Tgc, elem)

Author
Seyed Ali Ghasemi
License
BSD 3-Clause

Arguments

Type IntentOptional Attributes Name
class(nurbs_surface), 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(:)

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

Author
Seyed Ali Ghasemi
License
BSD 3-Clause

Arguments

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

private pure subroutine elevate_degree(this, dir, t)

Author
Seyed Ali Ghasemi
License
BSD 3-Clause

Arguments

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

private impure subroutine export_Xc(this, filename)

Author
Seyed Ali Ghasemi
License
BSD 3-Clause

Arguments

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

private impure subroutine export_Xg(this, filename)

Author
Seyed Ali Ghasemi
License
BSD 3-Clause

Arguments

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

private pure subroutine finalize(this)

Author
Seyed Ali Ghasemi
License
BSD 3-Clause

Arguments

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

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

Author
Seyed Ali Ghasemi
License
BSD 3-Clause

Arguments

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

private pure subroutine modify_Wc(this, W, num)

Author
Seyed Ali Ghasemi
License
BSD 3-Clause

Arguments

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

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

Author
Seyed Ali Ghasemi
License
BSD 3-Clause

Arguments

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

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_surface), 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

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_surface), 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(2)
real(kind=rk), intent(out), optional, allocatable :: nearest_Xg(:)

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

Author
Seyed Ali Ghasemi
License
BSD 3-Clause

Arguments

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

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

Author
Seyed Ali Ghasemi
License
BSD 3-Clause

Arguments

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

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

Author
Seyed Ali Ghasemi
License
BSD 3-Clause

Arguments

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

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

Author
Seyed Ali Ghasemi
License
BSD 3-Clause

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

Arguments

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

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

Author
Seyed Ali Ghasemi
License
BSD 3-Clause

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

Arguments

Type IntentOptional Attributes Name
class(nurbs_surface), intent(inout) :: this
real(kind=rk), intent(in), contiguous :: Xth_dir1(:)
real(kind=rk), intent(in), contiguous :: Xth_dir2(:)
integer, intent(in), contiguous :: degree(:)
integer, intent(in), contiguous :: continuity1(:)
integer, intent(in), contiguous :: continuity2(:)
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 surface using control points and weights.

Arguments

Type IntentOptional Attributes Name
class(nurbs_surface), 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_surface), 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(:)

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

Author
Seyed Ali Ghasemi
License
BSD 3-Clause

Arguments

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

private pure subroutine set_elem(this, elemConn)

Author
Seyed Ali Ghasemi
License
BSD 3-Clause

Arguments

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

private pure subroutine set_elem_Xc_vis(this, elemConn)

Author
Seyed Ali Ghasemi
License
BSD 3-Clause

Arguments

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

private pure subroutine set_elem_Xg_vis(this, elemConn)

Author
Seyed Ali Ghasemi
License
BSD 3-Clause

Arguments

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

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

Author
Seyed Ali Ghasemi
License
BSD 3-Clause

Arguments

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

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

Author
Seyed Ali Ghasemi
License
BSD 3-Clause

Arguments

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

private pure subroutine set_tetragon(this, L, nc, Wc)

Author
Seyed Ali Ghasemi
License
BSD 3-Clause

Arguments

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

private impure subroutine show(this, vtkfile_Xc, vtkfile_Xg)

Author
Seyed Ali Ghasemi
License
BSD 3-Clause

Arguments

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

private pure subroutine translate_Xc(this, vec)

Author
Seyed Ali Ghasemi
License
BSD 3-Clause

Arguments

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

private pure subroutine translate_Xg(this, vec)

Author
Seyed Ali Ghasemi
License
BSD 3-Clause

Arguments

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