|
BSpline Finite Element Exterior Calculus
|
The B-spline basis module. More...
Data Types | |
| type | bsplinefun |
| The B-spline function type. More... | |
| interface | bsplinespace |
| The B-spline space type. More... | |
| interface | evaluate |
| Evaluate a B-spline (function) More... | |
| interface | evaluate_support |
| interface | get_index_ranges |
| Get the index ranges for integrating a B-spline or the product of two B-splines. More... | |
| interface | get_petsc |
| Convert a B-spline function to a PETSc vector. More... | |
| interface | quadrature |
| Compute quadrature of a B-spline. More... | |
| interface | quadrature_product |
| Compute quadrature of the product of two B-splines. More... | |
| interface | size |
| Get the size of the B-spline space (i.e., the number of linearly independent B-splines) More... | |
Functions/Subroutines | |
| pure type(bsplinespace) function, public | derivative (bspline, allow_periodic_degree0) |
| Returns the B-spline space containing the derivatives of the given B-spline space. | |
| pure type(bsplinespace) function, public | anti_derivative (bspline) |
| Returns the B-spline space containing the anti-derivatives of the given B-spline space. | |
| pure real(wp) function, public | evaluate_single (this, x, j, derivative) |
| Evaluate the j-th B-spline of the B-spline space 'this' at x. | |
| real(wp) function, public | find_root_newton (this, x0, rhs, max_iter, tol, success) |
| Find a root of the B-spline function 'this' minus rhs using Newton's method. | |
| real(wp) function, public | find_root_brent (this, x0, x1, rhs, max_iter, tol, success, res0, res1) |
| Find a root of the B-spline function 'this' minus rhs using Brent's method. | |
| pure integer function, public | get_j_minus_i_quad (this, j, i) |
| Determine j_actual - i, where the input j may exceed the number of B-splines. | |
| pure subroutine, public | get_j_internal (this, j, j_internal, bspline_mirrored) |
| Get the internal B-spline index and whether the B-spline is mirrored. | |
| pure subroutine, public | get_internal_and_actual_inds (bspline, i, j_minus_i, j, j_internal, bspline_mirrored) |
| Get the internal B-spline index and the actual B-spline index. | |
| pure integer function, public | get_interval_index (bspline, x) |
| Get the interval index for a point in the B-spline space. | |
The B-spline basis module.
This module provides
The space is defined by the number of uniform intervals, the B-spline degree, as well as the boundary type:
| pure type(bsplinespace) function, public m_bspline_basis::anti_derivative | ( | type(bsplinespace), intent(in) | bspline | ) |
Returns the B-spline space containing the anti-derivatives of the given B-spline space.
| [in] | bspline | The B-spline space |
| pure type(bsplinespace) function, public m_bspline_basis::derivative | ( | type(bsplinespace), intent(in) | bspline, |
| logical, intent(in), optional | allow_periodic_degree0 ) |
Returns the B-spline space containing the derivatives of the given B-spline space.
| [in] | bspline | The B-spline space |
| [in] | allow_periodic_degree0 | Whether to allow periodic degree 0 B-splines in the 0-form space (default: false) |
| pure real(wp) function, public m_bspline_basis::evaluate_single | ( | type(bsplinespace), intent(in) | this, |
| real(wp), intent(in) | x, | ||
| integer, intent(in) | j, | ||
| logical, intent(in), optional | derivative ) |
Evaluate the j-th B-spline of the B-spline space 'this' at x.
| [in] | this | The B-spline space |
| [in] | x | The evaluation point |
| [in] | j | The B-spline index |
| [in] | derivative | _(optional)_ If true, the derivative of the B-spline is evaluated |
| real(wp) function, public m_bspline_basis::find_root_brent | ( | type(bsplinefun), intent(in) | this, |
| real(wp), intent(in) | x0, | ||
| real(wp), intent(in) | x1, | ||
| real(wp), intent(in), optional | rhs, | ||
| integer, intent(in), optional | max_iter, | ||
| real(wp), intent(in), optional | tol, | ||
| logical, intent(out), optional | success, | ||
| real(wp), intent(in), optional | res0, | ||
| real(wp), intent(in), optional | res1 ) |
Find a root of the B-spline function 'this' minus rhs using Brent's method.
| [in] | this | The B-spline function |
| [in] | x0 | The left-hand side of the bracketed interval for the root |
| [in] | x1 | The right-hand side of the bracketed interval for the root |
| [in] | rhs | _(optional)_ The right-hand side value to find the root of (default: 0) |
| [in] | max_iter | _(optional)_ The maximum number of iterations for the root-finding method (default: 20) |
| [in] | tol | _(optional)_ The tolerance for convergence of the root-finding method (default: 1e-6) |
| [out] | success | _(optional)_ A logical flag indicating whether the root-finding method converged successfully |
| [in] | res0 | _(optional)_ The value of the function minus rhs at x0 (if cheaply available) |
| [in] | res1 | _(optional)_ The value of the function minus rhs at x1 (if cheaply available) |
| real(wp) function, public m_bspline_basis::find_root_newton | ( | type(bsplinefun), intent(in) | this, |
| real(wp), intent(in), optional | x0, | ||
| real(wp), intent(in), optional | rhs, | ||
| integer, intent(in), optional | max_iter, | ||
| real(wp), intent(in), optional | tol, | ||
| logical, intent(out), optional | success ) |
Find a root of the B-spline function 'this' minus rhs using Newton's method.
| [in] | this | The B-spline function |
| [in] | x0 | _(optional)_ The initial guess for the root (default: 0.5) |
| [in] | rhs | _(optional)_ The right-hand side value to find the root of (default: 0) |
| [in] | max_iter | _(optional)_ The maximum number of iterations for the root-finding method (default: 20) |
| [in] | tol | _(optional)_ The tolerance for convergence of the root-finding method (default: 1e-8) |
| [out] | success | _(optional)_ A logical flag indicating whether the root-finding method converged successfully |
| pure subroutine, public m_bspline_basis::get_internal_and_actual_inds | ( | type(bsplinespace), intent(in) | bspline, |
| integer, intent(in) | i, | ||
| integer, intent(in) | j_minus_i, | ||
| integer, intent(out) | j, | ||
| integer, intent(out), optional | j_internal, | ||
| logical, intent(out), optional | bspline_mirrored ) |
Get the internal B-spline index and the actual B-spline index.
| [in] | bspline | The B-spline space |
| [in] | i | The interval index |
| [in] | j_minus_i | The difference between the B-spline index and the interval index |
| [out] | j | The actual B-spline index (0:nr_bsplines-1) |
| [out] | j_internal | _(optional)_ The internal B-spline index (0:degree) |
| [out] | bspline_mirrored | _(optional)_ Whether the B-spline is mirrored (i.e., the B-spline is on the right boundary of the domain) |
| pure integer function, public m_bspline_basis::get_interval_index | ( | type(bsplinespace), intent(in) | bspline, |
| real(wp), intent(in) | x ) |
Get the interval index for a point in the B-spline space.
| [in] | bspline | The B-spline space |
| [in] | x | The point |
| pure subroutine, public m_bspline_basis::get_j_internal | ( | type(bsplinespace), intent(in) | this, |
| integer, intent(in) | j, | ||
| integer, intent(out) | j_internal, | ||
| logical, intent(out) | bspline_mirrored ) |
Get the internal B-spline index and whether the B-spline is mirrored.
| [in] | this | The B-spline space |
| [in] | j | The B-spline index |
| [out] | j_internal | The internal B-spline index (0:degree) |
| [out] | bspline_mirrored | _(optional)_ Whether the B-spline is mirrored (i.e., the B-spline is on the right boundary of the domain) |
| pure integer function, public m_bspline_basis::get_j_minus_i_quad | ( | type(bsplinespace), intent(in) | this, |
| integer, intent(in) | j, | ||
| integer, intent(in) | i ) |
Determine j_actual - i, where the input j may exceed the number of B-splines.
| [in] | this | The B-spline basis |
| [in] | j | The B-spline index |
| [in] | i | The interval index |