Skip to content
ForCADDocumentation

forcad_multipatch Module

Shared topology and continuity metadata for NURBS multipatches.

A multipatch_connection identifies two oriented patch boundaries and the continuity requested across their interface. For a patch parameter with active interval , define the normalized local increment from its selected boundary by

Thus at the interface and its positive direction follows the stored parameter axis; at a maximum side it is not an inward coordinate. ForCAD's parametric convention equates derivatives with respect to these normalized coordinates through order , after applying interface orientation. Geometric curve connections compose the patch-B parameter with a scalar transition map . The compact transition jet is

For the compact separable surface and volume representation, corresponding mapped tangential coordinates remain fixed and the order- interface equation is

where is a partial exponential Bell polynomial. Parametric uses the signed affine transition , so only the coefficient remains. Here when one connected side is a minimum and the other a maximum, and when both are the same side type. Geometric uses the complete supplied transition jet. Order zero always enforces trace equality.

For curves, this univariate transition is the complete local parameter-transition model. Surface and volume connections additionally accept a full interface jet of a multivariate transition

where all mapped tangential coordinates and the mapped normal coordinate have independently specified normal derivatives. Each component of is stored as a univariate or tensor-product Bernstein polynomial over the normalized patch-A interface. This permits tangentially varying normal jets and normal-dependent tangential coordinates. The resulting mixed derivatives are assembled with the multivariate Faa di Bruno formula.

Rational connections act on homogeneous lifts. They may supply the Bernstein jet of a nonvanishing projective factor in

Omitting the full transition and projective jets selects the compact, faster separable model with one constant projective scale. The general surface and volume paths enforce the resulting piecewise-polynomial identities by degree-complete collocation on every interface knot span.

Tangential orientation is represented by reversal, swap, and per-axis flips. Rank-specific connect methods validate metadata and compatible trace spaces; rank-specific is_valid methods additionally check physical traces, rational projective weights, and assembled derivative residuals. A continuity value of -1 records topology without merging degrees of freedom; values 0:n request sparse continuity equations through that derivative order. Direct integer-map sharing is possible only for one-hot endpoint bases. Rational traces additionally require corresponding denominator coefficients to differ by one constant nonzero scale, which makes their rational trace basis functions identical. General unclamped traces and tangentially varying projective factors remain sparse linear constraints. Every floating-point coefficient that is structurally nonzero is retained in those constraints, irrespective of magnitude. In particular, a small projective factor is part of the homogeneous identity and is not a numerical zero. Solver equilibration must treat row and unknown scaling separately: for , a nonsingular diagonal row scaling gives , followed by recovery .

Geometric-continuity reference: P. Kiciak, "Conditions for geometric continuity between polynomial and rational surface patches," Computer Aided Geometric Design 13 (1996), 709--741. doi:10.1016/0167-8396(96)00006-4.

Multivariate-chain-rule reference: G. M. Constantine and T. H. Savits, "A multivariate Faa di Bruno formula with applications," Transactions of the American Mathematical Society 348 (1996), 503--520. doi:10.1090/S0002-9947-96-01501-2.



Derived Types

type, public ::  multipatch_connection

Oriented interface and continuity metadata for two patches.

Read more…

Type-Bound Procedures

procedure, public :: get_continuity => get_connection_continuity

Return the requested continuity order.

Read more…
procedure, public :: get_patch_a => get_connection_patch_a

Return the first patch identifier.

Read more…
procedure, public :: get_patch_b => get_connection_patch_b

Return the second patch identifier.

Read more…
procedure, public :: get_projective_jet => get_connection_projective_jet

Return the projective-factor jet.

Read more…
procedure, public :: get_reparameterization => get_connection_reparameterization

Return a copy of the transition jet.

Read more…
procedure, public :: get_side_a => get_connection_side_a

Return the first boundary identifier.

Read more…
procedure, public :: get_side_b => get_connection_side_b

Return the second boundary identifier.

Read more…
procedure, public :: get_transition_jet => get_connection_transition_jet

Return the multivariate transition jet.

Read more…
procedure, public :: has_projective_jet => connection_has_projective_jet

Report a variable projective-factor jet.

Read more…
procedure, public :: has_transition_jet => connection_has_transition_jet

Report a full multivariate transition jet.

Read more…
procedure, public :: is_flipped => get_connection_flip

Report a selected tangential-axis flip.

Read more…
procedure, public :: is_geometric => get_connection_geometric

Report whether geometric continuity is selected.

Read more…
procedure, public :: is_reversed => get_connection_reverse

Report tangential reversal.

Read more…
procedure, public :: is_swapped => get_connection_swap

Report tangential-axis exchange.

Read more…
procedure, public :: set => set_connection

Replace all connection metadata without patch-level validation.

Read more…

Functions

public pure function include_constraint(conn, geometric) result(selected)

Select connections with continuity equations and the requested optional kind.

Arguments

Type IntentOptional Attributes Name
type(multipatch_connection), intent(in) :: conn
logical, intent(in), optional :: geometric

Return Value logical

public pure function interpolated_trace_ids(nc, knot, conn, second, native) result(ids)

Oriented control IDs only when the endpoint interpolates a single normal layer.

Arguments

Type IntentOptional Attributes Name
integer, intent(in), contiguous :: nc(:)
real(kind=rk), intent(in), contiguous :: knot(:)
type(multipatch_connection), intent(in) :: conn
logical, intent(in) :: second
logical, intent(in), optional :: native

Keep the patch's storage order for a separate orientation map.

Return Value integer, allocatable, (:)

public pure function multipatch_compatible_trace_space(knot_a, nc_a, degree_a, knot_b, nc_b, degree_b, reverse, tol) result(ok)

Author
Seyed Ali Ghasemi
License
BSD 3-Clause

Test whether two normalized univariate trace spaces coincide.

Read more…

Arguments

Type IntentOptional Attributes Name
real(kind=rk), intent(in), contiguous :: knot_a(:)

First trace knot vector.

integer, intent(in) :: nc_a

First trace control-point count.

integer, intent(in) :: degree_a

First trace polynomial degree.

real(kind=rk), intent(in), contiguous :: knot_b(:)

Second trace knot vector.

integer, intent(in) :: nc_b

Second trace control-point count.

integer, intent(in) :: degree_b

Second trace polynomial degree.

logical, intent(in) :: reverse

Reverse the normalized second trace before comparison.

real(kind=rk), intent(in) :: tol

Tolerance relative to the active interval and to incident interior spans.

Return Value logical

public pure function multipatch_dof_offsets(patches, npatch) result(offsets)

Prefix counts in patch-storage numbering, including exterior controls.

Arguments

Type IntentOptional Attributes Name
class(*), intent(in), optional :: patches(:)
integer, intent(in) :: npatch

Return Value integer, allocatable, (:)

public pure elemental function multipatch_growth_capacity(current) result(next)

Author
Seyed Ali Ghasemi
License
BSD 3-Clause

Return the next geometric-growth capacity for patch metadata arrays. The result is at least 16 and doubles established capacities, giving amortized constant-time append without changing mathematical data.

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: current

Current allocation capacity; nonpositive values are allowed.

Return Value integer

public pure function multipatch_valid_reparameterization(connection, normal_sign, parameter_dimension) result(ok)

Author
Seyed Ali Ghasemi
License
BSD 3-Clause

Validate parametric, compact geometric, or multivariate geometric metadata. parameter_dimension is two for a surface and three for a volume. When it is absent, only the scalar curve/compact transition is accepted. A full transition stores Bernstein coefficients of every mapped coordinate derivative. Strictly signed first-normal-derivative coefficients provide a conservative certificate that the interface Jacobian is nonsingular. The same Bernstein convex-hull certificate is used for a supplied nonvanishing projective factor.

Arguments

Type IntentOptional Attributes Name
type(multipatch_connection), intent(in) :: connection

Connection metadata to validate.

integer, intent(in) :: normal_sign

Expected sign of the first normalized derivative.

integer, intent(in), optional :: parameter_dimension

Number of mapped coordinates for a full transition jet.

Return Value logical

public pure function requested(option)

An omitted logical option has its default value of false.

Arguments

Type IntentOptional Attributes Name
logical, intent(in), optional :: option

Return Value logical

public pure elemental function sample_count(length, h, minimum, maximum) result(n)

Clip the sample count before converting the length-to-size ratio to an integer.

Arguments

Type IntentOptional Attributes Name
real(kind=rk), intent(in) :: length
real(kind=rk), intent(in) :: h
integer, intent(in) :: minimum
integer, intent(in) :: maximum

Return Value integer

public pure function storage_weights(patches, offsets) result(weights)

Effective control weights in patch-concatenated storage order.

Arguments

Type IntentOptional Attributes Name
class(*), intent(in) :: patches(:)
integer, intent(in) :: offsets(:)

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

public pure function valid_connection_metadata(conn, npatch, ndim) result(valid)

Validate stored incidence, side numbering and the supplied change of parameters.

Arguments

Type IntentOptional Attributes Name
type(multipatch_connection), intent(in) :: conn
integer, intent(in) :: npatch
integer, intent(in) :: ndim

Return Value logical

public pure function valid_multipatch(patches, npatch, connections, nconnection, ndim, rtol, atol) result(ok)

Validate geometry and the homogeneous interface equations shared by analysis and design. In coordinates centered at a common physical origin, each row and component must satisfy , including summation roundoff. The denominator is checked with the same jet. Relative tolerance also controls the comparison of oriented knots and projective scales.

Arguments

Type IntentOptional Attributes Name
class(*), intent(in), optional :: patches(:)
integer, intent(in) :: npatch
type(multipatch_connection), intent(in), optional :: connections(:)
integer, intent(in) :: nconnection
integer, intent(in) :: ndim
real(kind=rk), intent(in), optional :: rtol
real(kind=rk), intent(in), optional :: atol

Return Value logical


Subroutines

public pure subroutine add_bernstein_shape(conn, degree_a, degree_b, ncells, nrow, nnz, value_rows)

Sum the tensor collocation rows and their maximum active support over all derivative orders.

Arguments

Type IntentOptional Attributes Name
type(multipatch_connection), intent(in) :: conn
integer, intent(in) :: degree_a(3)
integer, intent(in) :: degree_b(3)
integer, intent(in) :: ncells
integer, intent(inout) :: nrow
integer, intent(inout) :: nnz
integer, intent(out), optional :: value_rows

public pure subroutine add_separable_shape(conn, nc_a, degree_a, degree_b, nrow, nnz, value_rows)

Count one normal jet per oriented tangential control for compact connections.

Arguments

Type IntentOptional Attributes Name
type(multipatch_connection), intent(in) :: conn
integer, intent(in) :: nc_a(:)
integer, intent(in) :: degree_a(:)
integer, intent(in) :: degree_b(:)
integer, intent(inout) :: nrow
integer, intent(inout) :: nnz
integer, intent(out), optional :: value_rows

public pure subroutine append_bernstein_constraint(conn, offsets, degree_a, degree_b, stride_a, stride_b, reverse_dir, knot_na, knot_nb, knot_ta1, knot_tb1, knot_ta2, knot_tb2, rowptr, split, col, val, row, pos, power, resolved)

Degree-complete Bernstein collocation on an oriented edge or face. Degrees and strides follow the two mapped tangents, then the normal. An edge uses a constant second tangent with zero storage stride.

Arguments

Type IntentOptional Attributes Name
type(multipatch_connection), intent(in) :: conn
integer, intent(in), contiguous :: offsets(:)
integer, intent(in) :: degree_a(3)
integer, intent(in) :: degree_b(3)
integer, intent(in) :: stride_a(3)
integer, intent(in) :: stride_b(3)
logical, intent(in) :: reverse_dir(2)
real(kind=rk), intent(in), contiguous :: knot_na(:)
real(kind=rk), intent(in), contiguous :: knot_nb(:)
real(kind=rk), intent(in), contiguous :: knot_ta1(:)
real(kind=rk), intent(in), contiguous :: knot_tb1(:)
real(kind=rk), intent(in), contiguous :: knot_ta2(:)
real(kind=rk), intent(in), contiguous :: knot_tb2(:)
integer, intent(inout), contiguous :: rowptr(:)
integer, intent(inout), contiguous :: split(:)
integer, intent(inout), contiguous :: col(:)
real(kind=rk), intent(inout), contiguous :: val(:)
integer, intent(inout) :: row
integer, intent(inout) :: pos
integer, intent(inout) :: power
logical, intent(out) :: resolved

public pure subroutine append_connection(connections, count, conn)

Store a validated connection with amortized growth of the interface table.

Arguments

Type IntentOptional Attributes Name
type(multipatch_connection), intent(inout), allocatable :: connections(:)
integer, intent(inout) :: count
type(multipatch_connection), intent(in) :: conn

public pure subroutine append_separable_constraint(conn, nc_a, nc_b, knot_a, knot_b, offsets, rowptr, split, col, val, row, pos)

Append one connection's trace equations in patch-concatenated control numbering.

Arguments

Type IntentOptional Attributes Name
type(multipatch_connection), intent(in) :: conn
integer, intent(in), contiguous :: nc_a(:)
integer, intent(in), contiguous :: nc_b(:)
real(kind=rk), intent(in), contiguous :: knot_a(:)
real(kind=rk), intent(in), contiguous :: knot_b(:)
integer, intent(in) :: offsets(:)
integer, intent(inout) :: rowptr(:)
integer, intent(inout) :: split(:)
integer, intent(inout) :: col(:)
real(kind=rk), intent(inout) :: val(:)
integer, intent(inout) :: row
integer, intent(inout) :: pos

public pure subroutine assemble_design_gradient(patches, connections, nconnection, offsets, valid, local_dXc, local_dlogWc, dXc, dlogWc, err, map)

Assemble a scalar objective gradient in independent control positions and log weights. Local partials use patch storage order. A nested trace couples fine positions to coarse weights, so supply its coordinate partial even when requesting only the weight gradient. Positive map entries identify direct copies. Blended fine controls and inactive controls without an active representative have ID zero.

Arguments

Type IntentOptional Attributes Name
class(*), intent(in), optional :: patches(:)
type(multipatch_connection), intent(in), optional :: connections(:)
integer, intent(in) :: nconnection
integer, intent(in) :: offsets(:)
logical, intent(in) :: valid
real(kind=rk), intent(in), optional :: local_dXc(:,:)
real(kind=rk), intent(in), optional :: local_dlogWc(:)
real(kind=rk), intent(out), optional, allocatable :: dXc(:,:)
real(kind=rk), intent(out), optional, allocatable :: dlogWc(:)
type(debug), intent(out), optional :: err
integer, intent(out), optional, allocatable :: map(:)

public pure subroutine check_constraint_residuals(rowptr, col, val, powers, points, weights, rtol, atol, ok)

Test each centered homogeneous CSR residual in a common radix scale. Reuse the validation copy of each coefficient and exponent to store its product with the control weight. The final component checks the denominator whenever weights are present. For each component the signed sum, its absolute-term bound and atol share one exponent.

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: rowptr(:)
integer, intent(in) :: col(:)
real(kind=rk), intent(inout) :: val(:)
integer, intent(inout) :: powers(:)
real(kind=rk), intent(in) :: points(:,:)
real(kind=rk), intent(in) :: weights(:)
real(kind=rk), intent(in) :: rtol
real(kind=rk), intent(in) :: atol
logical, intent(out) :: ok

public pure subroutine check_new_patch(ndim, patch, ready, err, id)

Validate the patch before assigning a storage ID or recording any of its faces.

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: ndim
class(*), intent(in) :: patch
logical, intent(in) :: ready
type(debug), intent(inout) :: err
integer, intent(out), optional :: id

public pure subroutine check_patch_transform(patches, npatch, ndim, linear, translation, center, err)

Validate a common physical coordinate map before changing any connected patch.

Arguments

Type IntentOptional Attributes Name
class(*), intent(in), optional :: patches(:)
integer, intent(in) :: npatch
integer, intent(in) :: ndim
real(kind=rk), intent(in) :: linear(:,:)
real(kind=rk), intent(in), optional :: translation(:)
real(kind=rk), intent(in), optional :: center(:)
type(debug), intent(inout) :: err

public pure subroutine connection_weight_scale(patches, conn, tol, weight_scale, ok, scale_power)

Compare the oriented denominator coefficients W_A = factor * W_B. Polynomial patches have unit denominator, including stored constant weights. Only active normal layers enter the endpoint contraction on each rational side.

Arguments

Type IntentOptional Attributes Name
class(*), intent(in) :: patches(:)
type(multipatch_connection), intent(in) :: conn
real(kind=rk), intent(in) :: tol
real(kind=rk), intent(out) :: weight_scale
logical, intent(out) :: ok
integer, intent(out) :: scale_power

public pure subroutine constraint_rows(patches, connections, nconnection, offsets, rowptr, col, val, geometric, field, err, powers, rtol, active_only)

Assemble one-based CSR equations with row pointers rowptr, columns col and coefficients val. Raw columns index homogeneous controls in patch storage order. A nested edge or face contributes one row per fine control, with both traces expressed in the fine basis. Set field=.true. for equilibrated ordinary-field rows. With active_only=.true., they use the same IDs as the elements and omit rows already enforced by sharing. The optional geometric filter selects geometric or parametric connections. Inspect err for incompatible denominators or unrepresentable coefficients.

Arguments

Type IntentOptional Attributes Name
class(*), intent(in), optional :: patches(:)
type(multipatch_connection), intent(in), optional :: connections(:)
integer, intent(in) :: nconnection
integer, intent(in), contiguous :: offsets(:)
integer, intent(out), allocatable :: rowptr(:)
integer, intent(out), allocatable :: col(:)
real(kind=rk), intent(out), allocatable :: val(:)
logical, intent(in), optional :: geometric
logical, intent(in), optional :: field
type(debug), intent(out), optional :: err
integer, intent(out), optional, allocatable :: powers(:)
real(kind=rk), intent(in), optional :: rtol
logical, intent(in), optional :: active_only

public pure subroutine continuity_tolerances(rtol, atol, relative, absolute, valid)

Arguments

Type IntentOptional Attributes Name
real(kind=rk), intent(in), optional :: rtol
real(kind=rk), intent(in), optional :: atol
real(kind=rk), intent(out) :: relative
real(kind=rk), intent(out) :: absolute
logical, intent(out) :: valid

public pure subroutine element_layout(patches, npatch, rows, width)

Count positive tensor spans and the maximum number of controls per element.

Arguments

Type IntentOptional Attributes Name
class(*), intent(in), optional :: patches(:)
integer, intent(in) :: npatch
integer, intent(out), allocatable :: rows(:)
integer, intent(out), optional :: width

public pure subroutine finish_constraint_block(first, last, rowptr, split, col, val, factor, power, valid, weights, powers)

Apply the projective factor to side B of each row after assembling the basis jets.

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: first
integer, intent(in) :: last
integer, intent(in) :: rowptr(:)
integer, intent(in) :: split(:)
integer, intent(in) :: col(:)
real(kind=rk), intent(inout) :: val(:)
real(kind=rk), intent(in) :: factor
integer, intent(in) :: power
logical, intent(out) :: valid
real(kind=rk), intent(in), allocatable :: weights(:)
integer, intent(inout), optional, allocatable :: powers(:)

public pure subroutine finish_constraint_matrix(rowptr, col, val, pos, powers, compatible, valid, field, err, resolved)

Publish the populated CSR or an empty matrix with the reason assembly failed.

Arguments

Type IntentOptional Attributes Name
integer, intent(inout), allocatable :: rowptr(:)
integer, intent(inout), allocatable :: col(:)
real(kind=rk), intent(inout), allocatable :: val(:)
integer, intent(in) :: pos
integer, intent(inout), optional, allocatable :: powers(:)
logical, intent(in) :: compatible
logical, intent(in) :: valid
logical, intent(in) :: field
type(debug), intent(inout), optional :: err
logical, intent(in), optional :: resolved

public pure subroutine interface_quadrature(patches, npatch, connections, nconnection, ndim, object_err, connection, Xt_a, Xt_b, weight, ngauss, physical, err)

Pair Gauss nodes of the two whole traces using the stored affine orientation. Rows of Xt_a and Xt_b are native patch parameters. Weights integrate side A's tangential parameters, or physical arc length/area on A when physical is true.

Arguments

Type IntentOptional Attributes Name
class(*), intent(in), optional :: patches(:)
integer, intent(in) :: npatch
type(multipatch_connection), intent(in), optional :: connections(:)
integer, intent(in) :: nconnection
integer, intent(in) :: ndim
type(debug), intent(in) :: object_err
integer, intent(in) :: connection
real(kind=rk), intent(out), allocatable :: Xt_a(:,:)
real(kind=rk), intent(out), allocatable :: Xt_b(:,:)
real(kind=rk), intent(out), allocatable :: weight(:)
integer, intent(in), optional :: ngauss(:)
logical, intent(in), optional :: physical
type(debug), intent(out), optional :: err

public pure subroutine interface_sampling(ndim, npatch, connections, nconnection, res, synchronize, resolution, err)

Connected tangential axes share the largest requested sampling count.

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: ndim
integer, intent(in) :: npatch
type(multipatch_connection), intent(in), optional :: connections(:)
integer, intent(in) :: nconnection
integer, intent(in) :: res(:,:)
logical, intent(in), optional :: synchronize
integer, intent(out), allocatable :: resolution(:,:)
type(debug), intent(inout) :: err

public pure subroutine merge_trace_dofs(parent, offsets, conn, a, b, Wa, Wb, merged)

Merge paired interpolatory controls with matching polynomial or rational trace bases.

Arguments

Type IntentOptional Attributes Name
integer, intent(inout), contiguous :: parent(:)
integer, intent(in) :: offsets(:)
type(multipatch_connection), intent(in) :: conn
integer, intent(in) :: a(:)
integer, intent(in) :: b(:)
real(kind=rk), intent(in), optional, contiguous :: Wa(:)
real(kind=rk), intent(in), optional, contiguous :: Wb(:)
logical, intent(out), optional :: merged

public pure subroutine multipatch_chain_rule_coefficients(connection, normal_sign, coefficient)

Author
Seyed Ali Ghasemi
License
BSD 3-Clause

Compute arbitrary-order univariate Faa di Bruno coefficients. coefficient(r,k) multiplies the kth normalized normal derivative on patch B when forming the rth derivative of its composition with the connection reparameterization. For C^n, this reduces exactly to the signed affine transition implied by the connected sides.

Read more…

Arguments

Type IntentOptional Attributes Name
type(multipatch_connection), intent(in) :: connection

Validated connection whose transition is applied.

integer, intent(in) :: normal_sign

Orientation sign for a parametric transition.

real(kind=rk), intent(out), allocatable :: coefficient(:,:)

Lower-triangular coefficient matrix indexed from zero.

public pure subroutine multipatch_composition_coefficients(transition, coefficient)

Author
Seyed Ali Ghasemi
License
BSD 3-Clause

Compute multivariate Faa di Bruno coefficients for one transition jet.

Read more…

Arguments

Type IntentOptional Attributes Name
real(kind=rk), intent(in), contiguous :: transition(:,:)

Transition derivatives [mapped coordinate,normal order].

real(kind=rk), intent(out), allocatable :: coefficient(:,:,:,:)

Composition coefficients indexed from zero.

public pure subroutine multipatch_dof_map(patches, connections, nconnection, offsets, active_only, map, shareable, include_aliases)

Number periodic and directly shareable controls in patch-storage order. The disjoint sets use path compression. Tarjan (1975).

Arguments

Type IntentOptional Attributes Name
class(*), intent(in), optional :: patches(:)
type(multipatch_connection), intent(in), optional :: connections(:)
integer, intent(in) :: nconnection
integer, intent(in) :: offsets(:)
logical, intent(in), optional :: active_only
integer, intent(out), allocatable :: map(:)
logical, intent(out), optional, allocatable :: shareable(:)
logical, intent(in), optional :: include_aliases

public pure subroutine multipatch_element_block(elem, first, local, offset, map)

Place one patch's exact active supports in the global table; padding stays zero.

Arguments

Type IntentOptional Attributes Name
integer, intent(inout) :: elem(:,:)
integer, intent(in) :: first
integer, intent(in) :: local(:,:)
integer, intent(in) :: offset
integer, intent(in), optional :: map(:)

public pure subroutine multipatch_element_ids(offsets, local, ids)

Expand cumulative element counts into patch owners or one-based patch-local rows.

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: offsets(:)
logical, intent(in) :: local
integer, intent(out), allocatable :: ids(:)

public pure subroutine multipatch_elements(patches, offsets, elem, map)

Assemble all patch elements using the supplied storage-to-solver map, if present.

Arguments

Type IntentOptional Attributes Name
class(*), intent(in), optional :: patches(:)
integer, intent(in) :: offsets(:)
integer, intent(out), allocatable :: elem(:,:)
integer, intent(in), optional :: map(:)

public pure subroutine multipatch_projective_weight_scale(Wa, Wb, tol, weight_scale, ok, scale_power, powers)

Compare positive denominator coefficients in a common exponent for each ratio.

Arguments

Type IntentOptional Attributes Name
real(kind=rk), intent(in), contiguous :: Wa(:)
real(kind=rk), intent(in), contiguous :: Wb(:)
real(kind=rk), intent(in) :: tol
real(kind=rk), intent(out) :: weight_scale
logical, intent(out) :: ok
integer, intent(out), optional :: scale_power

The factor is weight_scale * radix**scale_power. Without this output a scalar factor must fit.

integer, intent(in), optional :: powers(:,:)

Binary exponents of the two oriented trace coefficient arrays when kept in scaled form.

public pure subroutine record_connection(patches, npatch, ndim, connections, nconnection, conn, err)

Commit the connection once its jets and oriented tangential spaces are compatible.

Arguments

Type IntentOptional Attributes Name
class(*), intent(in) :: patches(:)
integer, intent(in) :: npatch
integer, intent(in) :: ndim
type(multipatch_connection), intent(inout), allocatable :: connections(:)
integer, intent(inout) :: nconnection
type(multipatch_connection), intent(inout) :: conn
type(debug), intent(inout) :: err

public pure subroutine require_patches(ndim, npatch, err)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: ndim
integer, intent(in) :: npatch
type(debug), intent(inout) :: err

public pure subroutine resolve_connection_sides(npatch, ndim, pa, label_a, pb, label_b, sa, sb, err)

Check incident patches and decode both boundary labels before indexing the patch table.

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: npatch
integer, intent(in) :: ndim
integer, intent(in) :: pa
character(len=*), intent(in) :: label_a
integer, intent(in) :: pb
character(len=*), intent(in) :: label_b
integer, intent(out) :: sa
integer, intent(out) :: sb
type(debug), intent(inout) :: err

public pure subroutine resolve_patch_interface(patches, npatch, ndim, pa, label_a, pb, label_b, continuity, sa, sb, order, err)

Resolve the sides and check the normal orders before constructing the interface jet.

Arguments

Type IntentOptional Attributes Name
class(*), intent(in), optional :: patches(:)
integer, intent(in) :: npatch
integer, intent(in) :: ndim
integer, intent(in) :: pa
character(len=*), intent(in) :: label_a
integer, intent(in) :: pb
character(len=*), intent(in) :: label_b
integer, intent(in), optional :: continuity
integer, intent(out) :: sa
integer, intent(out) :: sb
integer, intent(out) :: order
type(debug), intent(inout) :: err

public pure subroutine sampling_bounds(npatch, h, min_res, max_res, minimum, maximum, err)

Directional limits for automatic sampling of connected edges and faces.

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: npatch
real(kind=rk), intent(in) :: h
integer, intent(in), optional :: min_res(:)
integer, intent(in), optional :: max_res(:)
integer, intent(out) :: minimum(:)
integer, intent(out) :: maximum(:)
type(debug), intent(inout) :: err

public pure subroutine scale_projective_jet(jet, power)

The rational factor and all its derivatives share a homogeneous scale. Keep it outside Bernstein evaluation so a small factor survives collocation.

Arguments

Type IntentOptional Attributes Name
real(kind=rk), intent(inout) :: jet(:,:,:)
integer, intent(out) :: power

public pure subroutine seed_patch_dofs(parent, offset, local)

Seed a patch's disjoint sets from its independent, compact local numbering.

Arguments

Type IntentOptional Attributes Name
integer, intent(inout) :: parent(:)
integer, intent(in) :: offset
integer, intent(in) :: local(:)

public pure subroutine store_constraint_points(points, offset, Xc)

Store physical controls, padding missing coordinates with the common origin.

Arguments

Type IntentOptional Attributes Name
real(kind=rk), intent(inout) :: points(:,:)
integer, intent(in) :: offset
real(kind=rk), intent(in) :: Xc(:,:)

public pure subroutine trace_weight_stencil(nc, knot, conn, second, plane, offsets, basis)

Select the oriented normal basis and control offsets for one boundary trace.

Arguments

Type IntentOptional Attributes Name
integer, intent(in), contiguous :: nc(:)
real(kind=rk), intent(in), contiguous :: knot(:)
type(multipatch_connection), intent(in) :: conn
logical, intent(in) :: second
integer, intent(out), allocatable :: plane(:)
integer, intent(out), allocatable :: offsets(:)
real(kind=rk), intent(out), allocatable :: basis(:,:)

public pure subroutine volume_interface_axes(conn, tangent_a, mapped_b, reverse_dir)

Corresponding parameter axes on both faces, in the order of side A.

Arguments

Type IntentOptional Attributes Name
type(multipatch_connection), intent(in) :: conn
integer, intent(out) :: tangent_a(3)
integer, intent(out) :: mapped_b(3)
logical, intent(out), optional :: reverse_dir(2)

public pure subroutine weighted_trace_sum(basis, weights, value, power)

Positive endpoint denominator sum, returned in a power-of-radix gauge.

Arguments

Type IntentOptional Attributes Name
real(kind=rk), intent(in) :: basis(:)
real(kind=rk), intent(in) :: weights(:)
real(kind=rk), intent(out) :: value
integer, intent(out) :: power