IgANet
IGAnets - Isogeometric Analysis Networks
Loading...
Searching...
No Matches
iganet::BSplineCommon< BSplineCore > Class Template Reference

B-spline (common high-level functionality). More...

#include </home/runner/work/iganet/iganet/include/iganet/splines/bspline.hpp>

Inheritance diagram for iganet::BSplineCommon< BSplineCore >:
iganet::Spline_ iganet::utils::FullQualifiedName

Public Types

template<typename real_t , short_t GeoDim, short_t... Degrees>
using derived_self_type = BSplineCommon< typename BSplineCore::template derived_self_type< real_t, GeoDim, Degrees... > >
 Deduces the derived self-type when exposed to different class template parameters real_t and GeoDim, and the Degrees parameter pack.
 
template<template< typename, short_t, short_t... > class T, std::make_signed_t< short_t > degree_elevate = 0>
using derived_type = BSplineCommon< typename BSplineCore::template derived_type< T, degree_elevate > >
 Deduces the type of the template parameter T when exposed to the class template parameters real_t and GeoDim, and the Degrees parameter pack. The optional template parameter degree_elevate can be used to (de-)elevate the degrees by an additive constant.
 
using Ptr = std::shared_ptr< BSplineCommon >
 Shared pointer for BSplineCommon.
 
template<typename other_t >
using real_derived_self_type = BSplineCommon< typename BSplineCore::template real_derived_self_type< other_t > >
 Deduces the derived self-type when exposed to a different class template parameter real_t.
 
template<std::make_signed_t< short_t > degree_elevate = 0>
using self_type = BSplineCommon< typename BSplineCore::template self_type< degree_elevate > >
 Deduces the self-type possibly degrees (de-)elevated by the additive constant degree_elevate.
 
using uPtr = std::unique_ptr< BSplineCommon >
 Unique pointer for BSplineCommon.
 

Public Member Functions

 BSplineCommon (BSplineCommon &&)=default
 Move constructor.
 
 BSplineCommon (BSplineCommon &&other, utils::TensorArray< BSplineCore::geoDim_ > &&coeffs)
 Move constructor with external coefficients.
 
 BSplineCommon (const BSplineCommon &)=default
 Copy constructor.
 
 BSplineCommon (const BSplineCommon &other, bool clone)
 Copy/clone constructor.
 
 BSplineCommon (const BSplineCommon &other, const utils::TensorArray< BSplineCore::geoDim_ > &coeffs, bool clone=false)
 Copy constructor with external coefficients.
 
template<typename OtherCore >
requires SplineCoreType<std::remove_cvref_t<OtherCore>>
 BSplineCommon (OtherCore &&core)
 Constructs the high-level B-spline from a compatible core.
 
auto abs_diff (const BSplineCommon &other, int dim=-1) const
 Computes the absolute difference between two compatible B-spline objects.
 
auto abs_diff_ (const BSplineCommon &other, int dim=-1)
 Computes the absolute difference between two compatible B-spline objects in-place.
 
auto boundingBox () const
 Computes the bounding box of the B-spline object.
 
auto clone () const
 Returns a clone of the B-spline object.
 
template<bool memory_optimized = false>
auto curl (const utils::TensorArray< BSplineCore::parDim_ > &xi, const utils::TensorArray< BSplineCore::parDim_ > &knot_indices) const
 Returns a block-tensor with the curl of the B-spline object with respect to the parametric variables.
 
template<bool memory_optimized = false>
auto curl (const utils::TensorArray< BSplineCore::parDim_ > &xi, const utils::TensorArray< BSplineCore::parDim_ > &knot_indices, const torch::Tensor &coeff_indices) const
 Returns a block-tensor with the curl of the B-spline object with respect to the parametric variables.
 
auto diff (const BSplineCommon &other, int dim=-1) const
 Computes the difference between two compatible B-spline objects.
 
auto diff_ (const BSplineCommon &other, int dim=-1)
 Computes the difference between two compatible B-spline objects in-place.
 
template<bool memory_optimized = false>
auto div (const utils::TensorArray< BSplineCore::parDim_ > &xi, const utils::TensorArray< BSplineCore::parDim_ > &knot_indices) const
 Returns a block-tensor with the divergence of the B-spline object with respect to the parametric variables.
 
template<bool memory_optimized = false>
auto div (const utils::TensorArray< BSplineCore::parDim_ > &xi, const utils::TensorArray< BSplineCore::parDim_ > &knot_indices, const torch::Tensor &coeff_indices) const
 Returns a block-tensor with the divergence of the B-spline object with respect to the parametric variables.
 
template<bool memory_optimized = false>
auto grad (const utils::TensorArray< BSplineCore::parDim_ > &xi, const utils::TensorArray< BSplineCore::parDim_ > &knot_indices) const
 Returns a block-tensor with the gradient of the B-spline object in the points xi with respect to the parametric variables.
 
template<bool memory_optimized = false>
auto grad (const utils::TensorArray< BSplineCore::parDim_ > &xi, const utils::TensorArray< BSplineCore::parDim_ > &knot_indices, const torch::Tensor &coeff_indices) const
 Returns a block-tensor with the gradient of the B-spline object in the points xi with respect to the parametric variables.
 
template<bool memory_optimized = false>
auto hess (const utils::TensorArray< BSplineCore::parDim_ > &xi, const utils::TensorArray< BSplineCore::parDim_ > &knot_indices) const
 Returns a block-tensor with the Hessian of the B-spline object in the points xi with respect to the parametric variables.
 
template<bool memory_optimized = false>
auto hess (const utils::TensorArray< BSplineCore::parDim_ > &xi, const utils::TensorArray< BSplineCore::parDim_ > &knot_indices, const torch::Tensor &coeff_indices) const
 Returns a block-tensor with the Hessian of the B-spline object in the points xi with respect to the parametric variables.
 
template<bool memory_optimized = false, typename Geometry >
auto icurl (const Geometry &G, const utils::TensorArray< BSplineCore::parDim_ > &xi, const utils::TensorArray< BSplineCore::parDim_ > &knot_indices, const torch::Tensor &coeff_indices, const utils::TensorArray< Geometry::parDim()> &knot_indices_G, const torch::Tensor &coeff_indices_G) const
 Returns a block-tensor with the curl of the B-spline object in the points xi with respect to the physical variables.
 
template<bool memory_optimized = false, typename Geometry >
auto icurl (const Geometry G, const utils::TensorArray< BSplineCore::parDim_ > &xi, const utils::TensorArray< BSplineCore::parDim_ > &knot_indices, const utils::TensorArray< Geometry::parDim()> &knot_indices_G) const
 Returns a block-tensor with the curl of the B-spline object in the points xi with respect to the physical variables.
 
template<bool memory_optimized = false, typename Geometry >
auto idiv (const Geometry &G, const utils::TensorArray< BSplineCore::parDim_ > &xi, const utils::TensorArray< BSplineCore::parDim_ > &knot_indices, const torch::Tensor &coeff_indices, const utils::TensorArray< Geometry::parDim()> &knot_indices_G, const torch::Tensor &coeff_indices_G) const
 Returns a block-tensor with the divergence of the B-spline object with respect to the physical variables.
 
template<bool memory_optimized = false, typename Geometry >
auto idiv (const Geometry G, const utils::TensorArray< BSplineCore::parDim_ > &xi, const utils::TensorArray< BSplineCore::parDim_ > &knot_indices, const utils::TensorArray< Geometry::parDim()> &knot_indices_G) const
 Returns a block-tensor with the divergence of the B-spline object with respect to the physical variables.
 
template<bool memory_optimized = false, typename Geometry >
auto igrad (const Geometry &G, const utils::TensorArray< BSplineCore::parDim_ > &xi, const utils::TensorArray< BSplineCore::parDim_ > &knot_indices, const torch::Tensor &coeff_indices, const utils::TensorArray< Geometry::parDim()> &knot_indices_G, const torch::Tensor &coeff_indices_G) const
 Returns a block-tensor with the gradient of the B-spline object in the points xi with respect to the physical variables.
 
template<bool memory_optimized = false, typename Geometry >
auto igrad (const Geometry G, const utils::TensorArray< BSplineCore::parDim_ > &xi, const utils::TensorArray< BSplineCore::parDim_ > &knot_indices, const utils::TensorArray< Geometry::parDim()> &knot_indices_G) const
 Returns a block-tensor with the gradient of the B-spline object in the points xi with respect to the physical variables.
 
template<bool memory_optimized = false, typename Geometry >
auto ihess (const Geometry &G, const utils::TensorArray< BSplineCore::parDim_ > &xi, const utils::TensorArray< BSplineCore::parDim_ > &knot_indices, const torch::Tensor &coeff_indices, const utils::TensorArray< Geometry::parDim()> &knot_indices_G, const torch::Tensor &coeff_indices_G) const
 Returns a block-tensor with the Hessian of the B-spline object in the points xi with respect to the physical variables.
 
template<bool memory_optimized = false, typename Geometry >
auto ihess (const Geometry G, const utils::TensorArray< BSplineCore::parDim_ > &xi, const utils::TensorArray< BSplineCore::parDim_ > &knot_indices, const utils::TensorArray< Geometry::parDim()> &knot_indices_G) const
 Returns a block-tensor with the Hessian of the B-spline object in the points xi with respect to the physical variables.
 
template<bool memory_optimized = false, typename Geometry >
auto ijac (const Geometry &G, const utils::TensorArray< BSplineCore::parDim_ > &xi, const utils::TensorArray< BSplineCore::parDim_ > &knot_indices, const torch::Tensor &coeff_indices, const utils::TensorArray< Geometry::parDim()> &knot_indices_G, const torch::Tensor &coeff_indices_G) const
 Returns a block-tensor with the Jacobian of the B-spline object in the points xi with respect to the physical variables.
 
template<bool memory_optimized = false, typename Geometry >
auto ijac (const Geometry G, const utils::TensorArray< BSplineCore::parDim_ > &xi, const utils::TensorArray< BSplineCore::parDim_ > &knot_indices, const utils::TensorArray< Geometry::parDim()> &knot_indices_G) const
 Returns a block-tensor with the Jacobian of the B-spline object in the points xi with respect to the physical variables.
 
template<bool memory_optimized = false, typename Geometry >
auto ilapl (const Geometry &G, const utils::TensorArray< BSplineCore::parDim_ > &xi, const utils::TensorArray< BSplineCore::parDim_ > &knot_indices, const torch::Tensor &coeff_indices, const utils::TensorArray< Geometry::parDim()> &knot_indices_G, const torch::Tensor &coeff_indices_G) const
 Returns a block-tensor with the Laplacian of the B-spline object in the points xi with respect to the physical variables.
 
template<bool memory_optimized = false, typename Geometry >
auto ilapl (const Geometry G, const utils::TensorArray< BSplineCore::parDim_ > &xi, const utils::TensorArray< BSplineCore::parDim_ > &knot_indices, const utils::TensorArray< Geometry::parDim()> &knot_indices_G) const
 Returns a block-tensor with the Laplacian of the B-spline object in the points xi with respect to the physical variables.
 
template<bool memory_optimized = false>
auto jac (const utils::TensorArray< BSplineCore::parDim_ > &xi, const utils::TensorArray< BSplineCore::parDim_ > &knot_indices) const
 Returns a block-tensor with the Jacobian of the B-spline object in the points xi with respect to the parametric variables.
 
template<bool memory_optimized = false>
auto jac (const utils::TensorArray< BSplineCore::parDim_ > &xi, const utils::TensorArray< BSplineCore::parDim_ > &knot_indices, const torch::Tensor &coeff_indices) const
 Returns a block-tensor with the Jacobian of the B-spline object in the points xi with respect to the parametric variables.
 
template<bool memory_optimized = false>
auto lapl (const utils::TensorArray< BSplineCore::parDim_ > &xi, const utils::TensorArray< BSplineCore::parDim_ > &knot_indices) const
 Returns a block-tensor with the Laplacian of the B-spline object in the points xi with respect to the parametric variables.
 
template<bool memory_optimized = false>
auto lapl (const utils::TensorArray< BSplineCore::parDim_ > &xi, const utils::TensorArray< BSplineCore::parDim_ > &knot_indices, const torch::Tensor &coeff_indices) const
 Returns a block-tensor with the Laplacian of the B-spline object in the points xi with respect to the parametric variables.
 
auto norm () const
 Computes the norm of the B-spline object by computing the mean-squared sum of the function values evaluated at the Greville abscissae.
 
template<bool memory_optimized = false>
auto nv (const utils::TensorArray< BSplineCore::parDim_ > &xi, const utils::TensorArray< BSplineCore::parDim_ > &knot_indices) const
 Returns a block-tensor with the outward pointing normal vector of the B-spline object.
 
template<bool memory_optimized = false>
auto nv (const utils::TensorArray< BSplineCore::parDim_ > &xi, const utils::TensorArray< BSplineCore::parDim_ > &knot_indices, const torch::Tensor &coeff_indices) const
 Returns a block-tensor with the outward pointing normal vector of the B-spline object.
 
BSplineCommon operator* (BSplineCore::value_type s) const
 Returns a new B-spline object whose coefficients are scaled by a scalar.
 
BSplineCommon operator* (std::array< typename BSplineCore::value_type, BSplineCore::geoDim()> v) const
 Returns a new B-spline object whose coefficients are scaled by a vector.
 
BSplineCommonoperator*= (BSplineCore::value_type s)
 Scales the coefficients by a scalar.
 
BSplineCommonoperator*= (std::array< typename BSplineCore::value_type, BSplineCore::geoDim()> v)
 Scales the coefficients by a vector.
 
BSplineCommon operator+ (const BSplineCommon &other) const
 Returns a new B-spline object whose coefficients are the sum of that of two compatible B-spline objects.
 
BSplineCommonoperator+= (const BSplineCommon &other)
 Adds the coefficients of another B-spline object.
 
BSplineCommon operator- (const BSplineCommon &other) const
 Returns a new B-spline object whose coefficients are the difference of that of two compatible B-spline objects.
 
BSplineCommonoperator-= (const BSplineCommon &other)
 Substracts the coefficients of another B-spline object.
 
BSplineCommon operator/ (BSplineCore::value_type s) const
 Returns a new B-spline object whose coefficients are scaled by a scalar.
 
BSplineCommon operator/ (std::array< typename BSplineCore::value_type, BSplineCore::geoDim()> v) const
 Returns a new B-spline object whose coefficients are scaled by a vector.
 
BSplineCommonoperator/= (BSplineCore::value_type s)
 Scales the coefficients by a scalar.
 
BSplineCommonoperator/= (std::array< typename BSplineCore::value_type, BSplineCore::geoDim()> v)
 Scales the coefficients by a vector.
 
template<typename Backend = void, typename BSplineCoreColor >
auto plot (const BSplineCommon< BSplineCoreColor > &color, const nlohmann::json &json={}) const
 Plots the B-spline object colored by another B-spline object.
 
template<typename Backend = void, typename BSplineCoreColor >
auto plot (const BSplineCommon< BSplineCoreColor > &color, const std::initializer_list< utils::TensorArray< BSplineCore::parDim_ > > &xi, const nlohmann::json &json={}) const
 Plots the B-spline object colored by another B-spline object together with a set of sampling points.
 
template<typename Backend = void, typename BSplineCoreColor >
auto plot (const BSplineCommon< BSplineCoreColor > &color, const utils::TensorArray< BSplineCore::parDim_ > &xi, const nlohmann::json &json={}) const
 Plots the B-spline object colored by another B-spline object together with a set of sampling points.
 
template<typename Backend = void>
auto plot (const nlohmann::json &json={}) const
 Plots the B-spline object.
 
template<typename Backend = void>
auto plot (const std::initializer_list< utils::TensorArray< BSplineCore::parDim_ > > &xi, const nlohmann::json &json={}) const
 Plots the B-spline object together with a set of sampling points.
 
template<typename Backend = void>
auto plot (const utils::TensorArray< BSplineCore::parDim_ > &xi, const nlohmann::json &json={}) const
 Plots the B-spline object together with a set of sampling points.
 
void pretty_print (std::ostream &os) const noexcept override
 Returns a string representation of the BSplineCommon object.
 
auto rotate (BSplineCore::value_type angle) const
 Rotates the B-spline object by an angle in 2d.
 
auto rotate (std::array< typename BSplineCore::value_type, 3 > angle) const
 Rotates the B-spline object by three angles in 3d.
 
auto rotate_ (BSplineCore::value_type angle)
 Rotates the B-spline object by an angle in 2d in-place.
 
auto rotate_ (std::array< typename BSplineCore::value_type, 3 > angle)
 Rotates the B-spline object by three angles in 3d in-place.
 
auto scale (BSplineCore::value_type s, int dim=-1) const
 Scales the B-spline object by a scalar.
 
auto scale (std::array< typename BSplineCore::value_type, BSplineCore::geoDim()> v) const
 Scales the B-spline object by a vector.
 
auto scale_ (BSplineCore::value_type s, int dim=-1)
 Scales the B-spline object by a scalar in-place.
 
auto scale_ (std::array< typename BSplineCore::value_type, BSplineCore::geoDim()> v)
 Scales the B-spline object by a vector in-place.
 
template<typename real_t >
auto to () const
 Returns a copy of the B-spline object with real_t type.
 
template<typename real_t >
auto to (Options< real_t > options) const
 Returns a copy of the B-spline object with settings from options.
 
auto to (torch::Device device) const
 Returns a copy of the B-spline object with settings from device.
 
auto to_nonuniform () &&
 Converts a uniform B-spline into a non-uniform B-spline.
 
auto to_uniform () &&
 Converts a non-uniform B-spline into a uniform B-spline.
 
auto translate (std::array< typename BSplineCore::value_type, BSplineCore::geoDim()> v) const
 Translates the B-spline object by a vector.
 
auto translate_ (std::array< typename BSplineCore::value_type, BSplineCore::geoDim()> v)
 Translates the B-spline object by a vector in-place.
 
BSplineCommonuniform_refine (int numRefine=1, int dim=-1)
 Returns the B-spline object with uniformly refined knot and coefficient vectors.
 

Additional Inherited Members

- Protected Member Functions inherited from iganet::utils::FullQualifiedName
virtual ~FullQualifiedName ()=default
 
virtual const std::string & name () const noexcept
 Returns the full qualified name of the object.
 
- Protected Attributes inherited from iganet::utils::FullQualifiedName
at::optional< std::string > name_
 String storing the full qualified name of the object.
 

Detailed Description

template<typename BSplineCore>
requires SplineCoreType<BSplineCore>
class iganet::BSplineCommon< BSplineCore >

B-spline (common high-level functionality).

This class implements some high-level common functionality of all B-spline classes, e.g., plotting which rely on low-level functionality that is implemented differently for uniform and non-uniform B-splines. C++ would normally use virtual methods for this purpose and implement the common functionality in a base class. However, this is not performant for low-level functionality, e.g., point-wise function evaluation which is called repeatedly. Moreover, virtual methods do not work with templated functions, which is why we implement high-level common functionality here and 'inject' the core functionality by deriving from a particular base class.

Member Typedef Documentation

◆ derived_self_type

template<typename BSplineCore >
template<typename real_t , short_t GeoDim, short_t... Degrees>
using iganet::BSplineCommon< BSplineCore >::derived_self_type = BSplineCommon<typename BSplineCore::template derived_self_type< real_t, GeoDim, Degrees...> >

Deduces the derived self-type when exposed to different class template parameters real_t and GeoDim, and the Degrees parameter pack.

◆ derived_type

template<typename BSplineCore >
template<template< typename, short_t, short_t... > class T, std::make_signed_t< short_t > degree_elevate = 0>
using iganet::BSplineCommon< BSplineCore >::derived_type = BSplineCommon< typename BSplineCore::template derived_type<T, degree_elevate> >

Deduces the type of the template parameter T when exposed to the class template parameters real_t and GeoDim, and the Degrees parameter pack. The optional template parameter degree_elevate can be used to (de-)elevate the degrees by an additive constant.

◆ Ptr

template<typename BSplineCore >
using iganet::BSplineCommon< BSplineCore >::Ptr = std::shared_ptr<BSplineCommon>

Shared pointer for BSplineCommon.

◆ real_derived_self_type

template<typename BSplineCore >
template<typename other_t >
using iganet::BSplineCommon< BSplineCore >::real_derived_self_type = BSplineCommon< typename BSplineCore::template real_derived_self_type<other_t> >

Deduces the derived self-type when exposed to a different class template parameter real_t.

◆ self_type

template<typename BSplineCore >
template<std::make_signed_t< short_t > degree_elevate = 0>
using iganet::BSplineCommon< BSplineCore >::self_type = BSplineCommon<typename BSplineCore::template self_type<degree_elevate> >

Deduces the self-type possibly degrees (de-)elevated by the additive constant degree_elevate.

◆ uPtr

template<typename BSplineCore >
using iganet::BSplineCommon< BSplineCore >::uPtr = std::unique_ptr<BSplineCommon>

Unique pointer for BSplineCommon.

Constructor & Destructor Documentation

◆ BSplineCommon() [1/6]

template<typename BSplineCore >
iganet::BSplineCommon< BSplineCore >::BSplineCommon ( const BSplineCommon< BSplineCore > &  )
default

Copy constructor.

◆ BSplineCommon() [2/6]

template<typename BSplineCore >
iganet::BSplineCommon< BSplineCore >::BSplineCommon ( const BSplineCommon< BSplineCore > &  other,
bool  clone 
)
inline

Copy/clone constructor.

Parameters
otherSecond input value.
cloneValue of clone.

◆ BSplineCommon() [3/6]

template<typename BSplineCore >
iganet::BSplineCommon< BSplineCore >::BSplineCommon ( const BSplineCommon< BSplineCore > &  other,
const utils::TensorArray< BSplineCore::geoDim_ > &  coeffs,
bool  clone = false 
)
inline

Copy constructor with external coefficients.

Parameters
otherSecond input value.
coeffsValue of coeffs.
cloneValue of clone.

◆ BSplineCommon() [4/6]

template<typename BSplineCore >
iganet::BSplineCommon< BSplineCore >::BSplineCommon ( BSplineCommon< BSplineCore > &&  )
default

Move constructor.

◆ BSplineCommon() [5/6]

template<typename BSplineCore >
template<typename OtherCore >
requires SplineCoreType<std::remove_cvref_t<OtherCore>>
iganet::BSplineCommon< BSplineCore >::BSplineCommon ( OtherCore &&  core)
inlineexplicit

Constructs the high-level B-spline from a compatible core.

Template Parameters
OtherCoreTemplate parameter OtherCore.
Parameters
coreValue of core.

◆ BSplineCommon() [6/6]

template<typename BSplineCore >
iganet::BSplineCommon< BSplineCore >::BSplineCommon ( BSplineCommon< BSplineCore > &&  other,
utils::TensorArray< BSplineCore::geoDim_ > &&  coeffs 
)
inline

Move constructor with external coefficients.

Parameters
otherSecond input value.
coeffsValue of coeffs.

Member Function Documentation

◆ abs_diff()

template<typename BSplineCore >
auto iganet::BSplineCommon< BSplineCore >::abs_diff ( const BSplineCommon< BSplineCore > &  other,
int  dim = -1 
) const
inline

Computes the absolute difference between two compatible B-spline objects.

If dim = -1 the full coefficient vector of other is subtracted from that of the current B-spline object. Otherwise, only the specified direction is subtracted.

Parameters
otherSecond input value.
dimValue of dim.
Returns
Result of the operation.

◆ abs_diff_()

template<typename BSplineCore >
auto iganet::BSplineCommon< BSplineCore >::abs_diff_ ( const BSplineCommon< BSplineCore > &  other,
int  dim = -1 
)
inline

Computes the absolute difference between two compatible B-spline objects in-place.

If dim = -1 the full coefficient vector of other is subtracted from that of the current B-spline object. Otherwise, only the specified direction is subtracted.

Parameters
otherSecond input value.
dimValue of dim.
Returns
Result of the operation.

◆ boundingBox()

template<typename BSplineCore >
auto iganet::BSplineCommon< BSplineCore >::boundingBox ( ) const
inline

Computes the bounding box of the B-spline object.

Returns
Result of the operation.

◆ clone()

template<typename BSplineCore >
auto iganet::BSplineCommon< BSplineCore >::clone ( ) const
inline

Returns a clone of the B-spline object.

Returns
Result of the operation.

◆ curl() [1/4]

template<typename BSplineCore >
template<bool memory_optimized = false>
auto iganet::BSplineCommon< BSplineCore >::curl ( const torch::Tensor &  xi) const
inline

Returns a block-tensor with the curl of the B-spline object with respect to the parametric variables.

Parameters
[in]xiPoint(s) where to evaluate the curl.
Returns
Block-tensor with the curl with respect to the parametric variables xi.

\[ \nabla_{\boldsymbol{\xi}} \times \mathbf{u} = \begin{bmatrix} \mathbf{i}_0 & \cdots & \mathbf{i}_{d_\text{par}} \\ \frac{\partial}{\partial\xi_0} & \cdots & \frac{\partial}{\partial\xi_{d_\text{par}}} \\ u_0 & \cdots & u_{d_\text{par}} \end{bmatrix} \]

Note
This function can only be applied to B-spline objects with equal parametric and geometric dimensionality.

◆ curl() [2/4]

template<typename BSplineCore >
template<bool memory_optimized = false>
auto iganet::BSplineCommon< BSplineCore >::curl ( const utils::TensorArray< BSplineCore::parDim_ > &  xi) const
inline

Provides the curl operation.

Template Parameters
memory_optimizedTemplate parameter memory_optimized.
memory_optimizedTemplate parameter memory_optimized.
Parameters
xiParametric coordinates.
Returns
Result of the operation.

◆ curl() [3/4]

template<typename BSplineCore >
template<bool memory_optimized = false>
auto iganet::BSplineCommon< BSplineCore >::curl ( const utils::TensorArray< BSplineCore::parDim_ > &  xi,
const utils::TensorArray< BSplineCore::parDim_ > &  knot_indices 
) const
inline

Returns a block-tensor with the curl of the B-spline object with respect to the parametric variables.

Parameters
[in]xiPoint(s) where to evaluate the curl.
[in]knot_indicesKnot indices where to evaluate the curl.
Returns
Block-tensor with the curl with respect to the parametric variables.

\[ \nabla_{\boldsymbol{\xi}} \times \mathbf{u} = \begin{bmatrix} \mathbf{i}_0 & \cdots & \mathbf{i}_{d_\text{par}} \\ \frac{\partial}{\partial\xi_0} & \cdots & \frac{\partial}{\partial\xi_{d_\text{par}}} \\ u_0 & \cdots & u_{d_\text{par}} \end{bmatrix} \]

Note
This function can only be applied to B-spline objects with equal parametric and geometric dimensionality.

◆ curl() [4/4]

template<typename BSplineCore >
template<bool memory_optimized = false>
auto iganet::BSplineCommon< BSplineCore >::curl ( const utils::TensorArray< BSplineCore::parDim_ > &  xi,
const utils::TensorArray< BSplineCore::parDim_ > &  knot_indices,
const torch::Tensor &  coeff_indices 
) const
inline

Returns a block-tensor with the curl of the B-spline object with respect to the parametric variables.

Parameters
[in]xiPoint(s) where to evaluate the curl.
[in]knot_indicesKnot indices where to evaluate the curl.
[in]coeff_indicesCoefficient indices where to evaluate the curl.
Returns
Block-tensor with the curl of the B-spline with respect to the parametric variables.

\[ \nabla_{\boldsymbol{\xi}} \cdot \mathbf{u} = \text{trace} ( J_{\boldsymbol{\xi}}(u) ) = \frac{\partial u_0}{\partial \xi_0} + \frac{\partial u_1}{\partial \xi_1} + \dots \frac{\partial u_{d_\text{geo}}}{\partial \xi_{d_\text{par}}} \]

Note
This function can only be applied to B-spline objects with equal parametric and geometric dimensionality.

curl = 0, 0, du_y / dx - du_x / dy.

Only the third component is returned.

curl = du_z / dy - du_y / dz, du_x / dz - du_z / dx, du_y / dx - du_x / dy.

◆ diff()

template<typename BSplineCore >
auto iganet::BSplineCommon< BSplineCore >::diff ( const BSplineCommon< BSplineCore > &  other,
int  dim = -1 
) const
inline

Computes the difference between two compatible B-spline objects.

If dim = -1 the full coefficient vector of other is subtracted from that of the current B-spline object. Otherwise, only the specified direction is subtracted.

Parameters
otherSecond input value.
dimValue of dim.
Returns
Result of the operation.

◆ diff_()

template<typename BSplineCore >
auto iganet::BSplineCommon< BSplineCore >::diff_ ( const BSplineCommon< BSplineCore > &  other,
int  dim = -1 
)
inline

Computes the difference between two compatible B-spline objects in-place.

If dim = -1 the full coefficient vector of other is subtracted from that of the current B-spline object. Otherwise, only the specified direction is subtracted.

Parameters
otherSecond input value.
dimValue of dim.
Returns
Result of the operation.

◆ div() [1/4]

template<typename BSplineCore >
template<bool memory_optimized = false>
auto iganet::BSplineCommon< BSplineCore >::div ( const torch::Tensor &  xi) const
inline

Returns a block-tensor with the divergence of the B-spline object with respect to the parametric variables.

Parameters
[in]xiPoint(s) where to evaluate the divergence.
Returns
Block-tensor with the divergence with respect to the parametric variables xi.

\[ \nabla_{\boldsymbol{\xi}} \cdot \mathbf{u} = \text{trace} ( J_{\boldsymbol{\xi}}(u) ) = \frac{\partial u_0}{\partial \xi_0} + \frac{\partial u_1}{\partial \xi_1} + \dots \frac{\partial u_{d_\text{geo}}}{\partial \xi_{d_\text{par}}} \]

Note
This function can only be applied to B-spline objects with equal parametric and geometric dimensionality.

◆ div() [2/4]

template<typename BSplineCore >
template<bool memory_optimized = false>
auto iganet::BSplineCommon< BSplineCore >::div ( const utils::TensorArray< BSplineCore::parDim_ > &  xi) const
inline

Provides the div operation.

Template Parameters
memory_optimizedTemplate parameter memory_optimized.
Parameters
xiParametric coordinates.
Returns
Result of the operation.

◆ div() [3/4]

template<typename BSplineCore >
template<bool memory_optimized = false>
auto iganet::BSplineCommon< BSplineCore >::div ( const utils::TensorArray< BSplineCore::parDim_ > &  xi,
const utils::TensorArray< BSplineCore::parDim_ > &  knot_indices 
) const
inline

Returns a block-tensor with the divergence of the B-spline object with respect to the parametric variables.

Parameters
[in]xiPoint(s) where to evaluate the divergence.
[in]knot_indicesKnot indices where to evaluate the divergence.
Returns
Block-tensor with the divergence with respect to the parametric variables.

\[ \nabla_{\boldsymbol{\xi}} \cdot \mathbf{u} = \text{trace} ( J_{\boldsymbol{\xi}}(u) ) = \frac{\partial u_0}{\partial \xi_0} + \frac{\partial u_1}{\partial \xi_1} + \dots \frac{\partial u_{d_\text{geo}}}{\partial \xi_{d_\text{par}}} \]

Note
This function can only be applied to B-spline objects with equal parametric and geometric dimensionality.

◆ div() [4/4]

template<typename BSplineCore >
template<bool memory_optimized = false>
auto iganet::BSplineCommon< BSplineCore >::div ( const utils::TensorArray< BSplineCore::parDim_ > &  xi,
const utils::TensorArray< BSplineCore::parDim_ > &  knot_indices,
const torch::Tensor &  coeff_indices 
) const
inline

Returns a block-tensor with the divergence of the B-spline object with respect to the parametric variables.

Parameters
[in]xiPoint(s) where to evaluate the divergence.
[in]knot_indicesKnot indices where to evaluate the divergence.
[in]coeff_indicesCoefficient indices where to evaluate the divergence.
Returns
Block-tensor with the divergence of the B-spline with respect to the parametric variables.

\[ \nabla_{\boldsymbol{\xi}} \cdot \mathbf{u} = \text{trace} ( J_{\boldsymbol{\xi}}(u) ) = \frac{\partial u_0}{\partial \xi_0} + \frac{\partial u_1}{\partial \xi_1} + \dots \frac{\partial u_{d_\text{geo}}}{\partial \xi_{d_\text{par}}} \]

Note
This function can only be applied to B-spline objects with equal parametric and geometric dimensionality.

◆ grad() [1/4]

template<typename BSplineCore >
template<bool memory_optimized = false>
auto iganet::BSplineCommon< BSplineCore >::grad ( const torch::Tensor &  xi) const
inline

Returns a block-tensor with the gradient of the B-spline object in the points xi with respect to the parametric variables.

Parameters
[in]xiPoint(s) where to evaluate the gradient.
Returns
Block-tensor with the gradient with respect to the parametric variables xi.

\[ \nabla_{\boldsymbol{\xi}}u = \left(\frac{\partial u}{\partial \xi_0}, \frac{\partial u}{\partial \xi_1}, \dots \frac{\partial u}{\partial \xi_{d_\text{par}}}\right) \]

Note
This function can only be applied to B-spline objects with geometric dimensionality 1, i.e. scalar fields.

◆ grad() [2/4]

template<typename BSplineCore >
template<bool memory_optimized = false>
auto iganet::BSplineCommon< BSplineCore >::grad ( const utils::TensorArray< BSplineCore::parDim_ > &  xi) const
inline

Provides the grad operation.

Template Parameters
memory_optimizedTemplate parameter memory_optimized.
Parameters
xiParametric coordinates.
Returns
Result of the operation.

◆ grad() [3/4]

template<typename BSplineCore >
template<bool memory_optimized = false>
auto iganet::BSplineCommon< BSplineCore >::grad ( const utils::TensorArray< BSplineCore::parDim_ > &  xi,
const utils::TensorArray< BSplineCore::parDim_ > &  knot_indices 
) const
inline

Returns a block-tensor with the gradient of the B-spline object in the points xi with respect to the parametric variables.

Parameters
[in]xiPoint(s) where to evaluate the gradient.
[in]knot_indicesKnot indices where to evaluate the gradient.
Returns
Block-tensor with the gradient with respect to the parametric variables.

\[ \nabla_{\boldsymbol{\xi}}u = \left(\frac{\partial u}{\partial \xi_0}, \frac{\partial u}{\partial \xi_1}, \dots \frac{\partial u}{\partial \xi_{d_\text{par}}}\right) \]

Note
This function can only be applied to B-spline objects with geometric dimensionality 1, i.e. scalar fields.

◆ grad() [4/4]

template<typename BSplineCore >
template<bool memory_optimized = false>
auto iganet::BSplineCommon< BSplineCore >::grad ( const utils::TensorArray< BSplineCore::parDim_ > &  xi,
const utils::TensorArray< BSplineCore::parDim_ > &  knot_indices,
const torch::Tensor &  coeff_indices 
) const
inline

Returns a block-tensor with the gradient of the B-spline object in the points xi with respect to the parametric variables.

Parameters
[in]xiPoint(s) where to evaluate the gradient.
[in]knot_indicesKnot indices where to evaluate the gradient.
[in]coeff_indicesCoefficient indices where to evaluate the gradient.
Returns
Block-tensor with the gradient with respect to the parametric variables.

\[ \nabla_{\boldsymbol{\xi}}u = \left(\frac{\partial u}{\partial \xi_0}, \frac{\partial u}{\partial \xi_1}, \dots \frac{\partial u}{\partial \xi_{d_\text{par}}}\right) \]

Note
This function can only be applied to B-spline objects with geometric dimensionality 1, i.e. scalar fields.

◆ hess() [1/4]

template<typename BSplineCore >
template<bool memory_optimized = false>
auto iganet::BSplineCommon< BSplineCore >::hess ( const torch::Tensor &  xi) const
inline

Returns a block-tensor with the Hessian of the B-spline object in the points xi with respect to the parametric variables.

Parameters
[in]xiPoint(s) where to evaluate the Hessian.
Returns
Block-tensor with the Hessian with respect to the parametric variables xi.

\[ H_{\boldsymbol{\xi}}(u) = \begin{bmatrix} \frac{\partial^2 u}{\partial^2 \xi_0}& \frac{\partial^2 u}{\partial \xi_0\partial \xi_1}& \dots& \frac{\partial^2 u}{\partial \xi_0\partial \xi_{d_\text{par}}} \\ \frac{\partial^2 u}{\partial \xi_1\partial \xi_0}& \frac{\partial^2 u}{\partial^2 \xi_1}& \dots& \frac{\partial^2 u}{\partial \xi_1\partial \xi_{d_\text{par}}} \\ \vdots& \vdots & \ddots & \vdots \\ \frac{\partial^2 u}{\partial \xi_{d_\text{par}}\partial \xi_0}& \frac{\partial^2 u}{\partial \xi_{d_\text{par}}\partial \xi_1}& \dots& \frac{\partial^2 u}{\partial^2 \xi_{d_\text{par}}} \end{bmatrix} \]

Note
If the B-spline object has geometric dimension larger then one then all Hessian matrices are returned as slices of a rank-3 tensor.

◆ hess() [2/4]

template<typename BSplineCore >
template<bool memory_optimized = false>
auto iganet::BSplineCommon< BSplineCore >::hess ( const utils::TensorArray< BSplineCore::parDim_ > &  xi) const
inline

Provides the hess operation.

Template Parameters
memory_optimizedTemplate parameter memory_optimized.
Parameters
xiParametric coordinates.
Returns
Result of the operation.

◆ hess() [3/4]

template<typename BSplineCore >
template<bool memory_optimized = false>
auto iganet::BSplineCommon< BSplineCore >::hess ( const utils::TensorArray< BSplineCore::parDim_ > &  xi,
const utils::TensorArray< BSplineCore::parDim_ > &  knot_indices 
) const
inline

Returns a block-tensor with the Hessian of the B-spline object in the points xi with respect to the parametric variables.

Parameters
[in]xiPoint(s) where to evaluate the gradient.
[in]knot_indicesKnot indices where to evaluate the Hessian.
Returns
Block-tensor with the Hessian with respect to the parametric variables.

\[ H_{\boldsymbol{\xi}}(u) = \begin{bmatrix} \frac{\partial^2 u}{\partial^2 \xi_0}& \frac{\partial^2 u}{\partial \xi_0\partial \xi_1}& \dots& \frac{\partial^2 u}{\partial \xi_0\partial \xi_{d_\text{par}}} \\ \frac{\partial^2 u}{\partial \xi_1\partial \xi_0}& \frac{\partial^2 u}{\partial^2 \xi_1}& \dots& \frac{\partial^2 u}{\partial \xi_1\partial \xi_{d_\text{par}}} \\ \vdots& \vdots & \ddots & \vdots \\ \frac{\partial^2 u}{\partial \xi_{d_\text{par}}\partial \xi_0}& \frac{\partial^2 u}{\partial \xi_{d_\text{par}}\partial \xi_1}& \dots& \frac{\partial^2 u}{\partial^2 \xi_{d_\text{par}}} \end{bmatrix} \]

Note
If the B-spline object has geometric dimension larger then one then all Hessian matrices are returned as slices of a rank-3 tensor.

◆ hess() [4/4]

template<typename BSplineCore >
template<bool memory_optimized = false>
auto iganet::BSplineCommon< BSplineCore >::hess ( const utils::TensorArray< BSplineCore::parDim_ > &  xi,
const utils::TensorArray< BSplineCore::parDim_ > &  knot_indices,
const torch::Tensor &  coeff_indices 
) const
inline

Returns a block-tensor with the Hessian of the B-spline object in the points xi with respect to the parametric variables.

Parameters
[in]xiPoint(s) where to evaluate the Hessian.
[in]knot_indicesKnot indices where to evaluate the Hessian.
[in]coeff_indicesCoefficient indices where to evaluate the Hessian.
Returns
Block-tensor with the Hessian with respect to the parametric variables.

\[ H_{\boldsymbol{\xi}}(u) = \begin{bmatrix} \frac{\partial^2 u}{\partial^2 \xi_0}& \frac{\partial^2 u}{\partial \xi_0\partial \xi_1}& \dots& \frac{\partial^2 u}{\partial \xi_0\partial \xi_{d_\text{par}}} \\ \frac{\partial^2 u}{\partial \xi_1\partial \xi_0}& \frac{\partial^2 u}{\partial^2 \xi_1}& \dots& \frac{\partial^2 u}{\partial \xi_1\partial \xi_{d_\text{par}}} \\ \vdots& \vdots & \ddots & \vdots \\ \frac{\partial^2 u}{\partial \xi_{d_\text{par}}\partial \xi_0}& \frac{\partial^2 u}{\partial \xi_{d_\text{par}}\partial \xi_1}& \dots& \frac{\partial^2 u}{\partial^2 \xi_{d_\text{par}}} \end{bmatrix} \]

Note
If the B-spline object has geometric dimension larger then one then all Hessian matrices are returned as slices of a rank-3 tensor.

◆ icurl() [1/4]

template<typename BSplineCore >
template<bool memory_optimized = false, typename Geometry >
auto iganet::BSplineCommon< BSplineCore >::icurl ( const Geometry &  G,
const torch::Tensor &  xi 
) const
inline

Returns a block-tensor with the curl of the B-spline object in the points xi with respect to the physical variables.

Template Parameters
GeometryType of the geometry B-spline object.
Parameters
[in]GB-spline geometry object.
[in]xiPoint(s) where to evaluate the curl.
Returns
Block-tensor with the curl with respect to the parametric variables.

\[ \nabla \times {\mathbf{x}} u = \nabla_{\boldsymbol{\xi}} \times u \, \operatorname{det}(\operatorname{det}(J_{\boldsymbol{\xi}}(G))^{-1} \, J_{\boldsymbol{\xi}}(G) , \quad \mathbf{x} = G(\boldsymbol{\xi}) \]

◆ icurl() [2/4]

template<typename BSplineCore >
template<bool memory_optimized = false, typename Geometry >
auto iganet::BSplineCommon< BSplineCore >::icurl ( const Geometry &  G,
const utils::TensorArray< BSplineCore::parDim_ > &  xi 
) const
inline

Provides the icurl operation.

Template Parameters
memory_optimizedTemplate parameter memory_optimized.
GeometryTemplate parameter Geometry.
Parameters
GValue of G.
xiParametric coordinates.
Returns
Result of the operation.

◆ icurl() [3/4]

template<typename BSplineCore >
template<bool memory_optimized = false, typename Geometry >
auto iganet::BSplineCommon< BSplineCore >::icurl ( const Geometry &  G,
const utils::TensorArray< BSplineCore::parDim_ > &  xi,
const utils::TensorArray< BSplineCore::parDim_ > &  knot_indices,
const torch::Tensor &  coeff_indices,
const utils::TensorArray< Geometry::parDim()> &  knot_indices_G,
const torch::Tensor &  coeff_indices_G 
) const
inline

Returns a block-tensor with the curl of the B-spline object in the points xi with respect to the physical variables.

Template Parameters
GeometryType of the geometry B-spline object.
Parameters
[in]GB-spline geometry object.
[in]xiPoint(s) where to evaluate the gradient.
[in]knot_indicesKnot indices where to evaluate the gradient.
[in]knot_indices_GKnot indices where to evaluate the Jacobian of G.
[in]coeff_indicesCoefficient indices where to evaluate the gradient.
[in]coeff_indices_GCoefficient indices where to evaluate the Jacobian of G.
Returns
Block-tensor with the curl with respect to the physical variables.

\[ \nabla \times {\mathbf{x}} u = \nabla_{\boldsymbol{\xi}} \times u \, \operatorname{det}(\operatorname{det}(J_{\boldsymbol{\xi}}(G))^{-1} \, J_{\boldsymbol{\xi}}(G) , \quad \mathbf{x} = G(\boldsymbol{\xi}) \]

◆ icurl() [4/4]

template<typename BSplineCore >
template<bool memory_optimized = false, typename Geometry >
auto iganet::BSplineCommon< BSplineCore >::icurl ( const Geometry  G,
const utils::TensorArray< BSplineCore::parDim_ > &  xi,
const utils::TensorArray< BSplineCore::parDim_ > &  knot_indices,
const utils::TensorArray< Geometry::parDim()> &  knot_indices_G 
) const
inline

Returns a block-tensor with the curl of the B-spline object in the points xi with respect to the physical variables.

Template Parameters
GeometryType of the geometry B-spline object.
Parameters
[in]GB-spline geometry object.
[in]xiPoint(s) where to evaluate the gradient.
[in]knot_indicesKnot indices where to evaluate the gradient.
[in]knot_indices_GKnot indices where to evaluate Jacobian of G.
Returns
Block-tensor with the curl with respect to the physical variables.

\[ \nabla \times {\mathbf{x}} u = \nabla_{\boldsymbol{\xi}} \times u \, \operatorname{det}(\operatorname{det}(J_{\boldsymbol{\xi}}(G))^{-1} \, J_{\boldsymbol{\xi}}(G) , \quad \mathbf{x} = G(\boldsymbol{\xi}) \]

◆ idiv() [1/4]

template<typename BSplineCore >
template<bool memory_optimized = false, typename Geometry >
auto iganet::BSplineCommon< BSplineCore >::idiv ( const Geometry &  G,
const torch::Tensor &  xi 
)
inline

Returns a block-tensor with the divergence of the B-spline object with respect to the physical variables.

Template Parameters
GeometryType of the geometry B-spline object.
Parameters
[in]GB-spline geometry object.
[in]xiPoint(s) where to evaluate the divergence.
Returns
Block-tensor with the divergence with respect to the parametric variables.

\[ \nabla_{\mathbf{x}} \cdot \mathbf{u} = \text{trace} ( J_{\mathbf{x}}(u) ) = \frac{\partial u_0}{\partial x_0} + \frac{\partial u_1}{\partial x_1} + \frac{\partial u_{d_\text{geo}}}{\partial x_{d_\text{par}}} \]

◆ idiv() [2/4]

template<typename BSplineCore >
template<bool memory_optimized = false, typename Geometry >
auto iganet::BSplineCommon< BSplineCore >::idiv ( const Geometry &  G,
const utils::TensorArray< BSplineCore::parDim_ > &  xi 
) const
inline

Provides the idiv operation.

Template Parameters
memory_optimizedTemplate parameter memory_optimized.
GeometryTemplate parameter Geometry.
Parameters
GValue of G.
xiParametric coordinates.
Returns
Result of the operation.

◆ idiv() [3/4]

template<typename BSplineCore >
template<bool memory_optimized = false, typename Geometry >
auto iganet::BSplineCommon< BSplineCore >::idiv ( const Geometry &  G,
const utils::TensorArray< BSplineCore::parDim_ > &  xi,
const utils::TensorArray< BSplineCore::parDim_ > &  knot_indices,
const torch::Tensor &  coeff_indices,
const utils::TensorArray< Geometry::parDim()> &  knot_indices_G,
const torch::Tensor &  coeff_indices_G 
) const
inline

Returns a block-tensor with the divergence of the B-spline object with respect to the physical variables.

Template Parameters
GeometryType of the geometry B-spline object.
Parameters
[in]GB-spline geometry object.
[in]xiPoint(s) where to evaluate the divergence.
[in]knot_indicesKnot indices where to evaluate the divergence.
[in]knot_indices_GKnot indices where to evaluate the Jacobian of G.
[in]coeff_indicesCoefficient indices where to evaluate the divergence.
[in]coeff_indices_GCoefficient indices where to evaluate the Jacobian of G.
Returns
Block-tensor with the divergence with respect to the physical variables.

\[ \nabla_{\mathbf{x}} \cdot \mathbf{u} = \text{trace} ( J_{\mathbf{x}}(u) ) = \frac{\partial u_0}{\partial x_0} + \frac{\partial u_1}{\partial x_1} + \frac{\partial u_{d_\text{geo}}}{\partial x_{d_\text{par}}} \]

◆ idiv() [4/4]

template<typename BSplineCore >
template<bool memory_optimized = false, typename Geometry >
auto iganet::BSplineCommon< BSplineCore >::idiv ( const Geometry  G,
const utils::TensorArray< BSplineCore::parDim_ > &  xi,
const utils::TensorArray< BSplineCore::parDim_ > &  knot_indices,
const utils::TensorArray< Geometry::parDim()> &  knot_indices_G 
) const
inline

Returns a block-tensor with the divergence of the B-spline object with respect to the physical variables.

Template Parameters
GeometryType of the geometry B-spline object.
Parameters
[in]GB-spline geometry object.
[in]xiPoint(s) where to evaluate the divergence.
[in]knot_indicesKnot indices where to evaluate the divergence.
[in]knot_indices_GKnot indices where to evaluate the Jacobian of G.
Returns
Block-tensor with the divergence with respect to the physical variables.

\[ \nabla_{\mathbf{x}} \cdot \mathbf{u} = \text{trace} ( J_{\mathbf{x}}(u) ) = \frac{\partial u_0}{\partial x_0} + \frac{\partial u_1}{\partial x_1} + \frac{\partial u_{d_\text{geo}}}{\partial x_{d_\text{par}}} \]

◆ igrad() [1/4]

template<typename BSplineCore >
template<bool memory_optimized = false, typename Geometry >
auto iganet::BSplineCommon< BSplineCore >::igrad ( const Geometry &  G,
const torch::Tensor &  xi 
) const
inline

Returns a block-tensor with the gradient of the B-spline object in the points xi with respect to the physical variables.

Template Parameters
GeometryType of the geometry B-spline object.
Parameters
[in]GB-spline geometry object.
[in]xiPoint(s) where to evaluate the gradient.
Returns
Block-tensor with the gradient with respect to the parametric variables.

\[ \nabla_{\mathbf{x}} u = \nabla_{\boldsymbol{\xi}} u \, J_{\boldsymbol{\xi}}(G)^{-T} , \quad \mathbf{x} = G(\boldsymbol{\xi}) \]

◆ igrad() [2/4]

template<typename BSplineCore >
template<bool memory_optimized = false, typename Geometry >
auto iganet::BSplineCommon< BSplineCore >::igrad ( const Geometry &  G,
const utils::TensorArray< BSplineCore::parDim_ > &  xi 
) const
inline

Provides the igrad operation.

Template Parameters
memory_optimizedTemplate parameter memory_optimized.
GeometryTemplate parameter Geometry.
Parameters
GValue of G.
xiParametric coordinates.
Returns
Result of the operation.

◆ igrad() [3/4]

template<typename BSplineCore >
template<bool memory_optimized = false, typename Geometry >
auto iganet::BSplineCommon< BSplineCore >::igrad ( const Geometry &  G,
const utils::TensorArray< BSplineCore::parDim_ > &  xi,
const utils::TensorArray< BSplineCore::parDim_ > &  knot_indices,
const torch::Tensor &  coeff_indices,
const utils::TensorArray< Geometry::parDim()> &  knot_indices_G,
const torch::Tensor &  coeff_indices_G 
) const
inline

Returns a block-tensor with the gradient of the B-spline object in the points xi with respect to the physical variables.

Template Parameters
GeometryType of the geometry B-spline object.
Parameters
[in]GB-spline geometry object.
[in]xiPoint(s) where to evaluate the gradient.
[in]knot_indicesKnot indices where to evaluate the gradient.
[in]knot_indices_GKnot indices where to evaluate the Jacobian of G.
[in]coeff_indicesCoefficient indices where to evaluate the gradient.
[in]coeff_indices_GCoefficient indices where to evaluate the Jacobian of G.
Returns
Block-tensor with the gradient with respect to the physical variables.

\[ \nabla_{\mathbf{x}} u = \nabla_{\boldsymbol{\xi}} u \, J_{\boldsymbol{\xi}}(G)^{-T} , \quad \mathbf{x} = G(\boldsymbol{\xi}) \]

◆ igrad() [4/4]

template<typename BSplineCore >
template<bool memory_optimized = false, typename Geometry >
auto iganet::BSplineCommon< BSplineCore >::igrad ( const Geometry  G,
const utils::TensorArray< BSplineCore::parDim_ > &  xi,
const utils::TensorArray< BSplineCore::parDim_ > &  knot_indices,
const utils::TensorArray< Geometry::parDim()> &  knot_indices_G 
) const
inline

Returns a block-tensor with the gradient of the B-spline object in the points xi with respect to the physical variables.

Template Parameters
GeometryType of the geometry B-spline object.
Parameters
[in]GB-spline geometry object.
[in]xiPoint(s) where to evaluate the gradient.
[in]knot_indicesKnot indices where to evaluate the gradient.
[in]knot_indices_GKnot indices where to evaluate Jacobian of G.
Returns
Block-tensor with the gradient with respect to the physical variables.

\[ \nabla_{\mathbf{x}} u = \nabla_{\boldsymbol{\xi}} u \, J_{\boldsymbol{\xi}}(G)^{-T} , \quad \mathbf{x} = G(\boldsymbol{\xi}) \]

◆ ihess() [1/4]

template<typename BSplineCore >
template<bool memory_optimized = false, typename Geometry >
auto iganet::BSplineCommon< BSplineCore >::ihess ( const Geometry &  G,
const torch::Tensor &  xi 
) const
inline

Returns a block-tensor with the Hessian of the B-spline object in the points xi with respect to the physical variables.

Template Parameters
GeometryType of the geometry B-spline object.
Parameters
[in]GB-spline geometry object.
[in]xiPoint(s) where to evaluate the Hessian.
Returns
Block-tensor with the Hessian with respect to the parametric variables.

\[ H_{\mathbf{x}}(u) = J_{\boldsymbol{\xi}}(G)^{-T} \left( H_\boldsymbol{\xi}(u) - \sum_k \nabla_{\mathbf{x},k}u H_{\boldsymbol{\xi}}(G_k) \right) J_{\boldsymbol{\xi}}(G)^{-1} , \quad \mathbf{x} = G(\boldsymbol{\xi}) \]

◆ ihess() [2/4]

template<typename BSplineCore >
template<bool memory_optimized = false, typename Geometry >
auto iganet::BSplineCommon< BSplineCore >::ihess ( const Geometry &  G,
const utils::TensorArray< BSplineCore::parDim_ > &  xi 
) const
inline

Provides the ihess operation.

Template Parameters
memory_optimizedTemplate parameter memory_optimized.
GeometryTemplate parameter Geometry.
Parameters
GValue of G.
xiParametric coordinates.
Returns
Result of the operation.

◆ ihess() [3/4]

template<typename BSplineCore >
template<bool memory_optimized = false, typename Geometry >
auto iganet::BSplineCommon< BSplineCore >::ihess ( const Geometry &  G,
const utils::TensorArray< BSplineCore::parDim_ > &  xi,
const utils::TensorArray< BSplineCore::parDim_ > &  knot_indices,
const torch::Tensor &  coeff_indices,
const utils::TensorArray< Geometry::parDim()> &  knot_indices_G,
const torch::Tensor &  coeff_indices_G 
) const
inline

Returns a block-tensor with the Hessian of the B-spline object in the points xi with respect to the physical variables.

Template Parameters
GeometryType of the geometry B-spline object.
Parameters
[in]GB-spline geometry object.
[in]xiPoint(s) where to evaluate the Hessian.
[in]knot_indicesKnot indices where to evaluate the Hessian.
[in]knot_indices_GKnot indices where to evaluate the Jacobian of G.
[in]coeff_indicesCoefficient indices where to evaluate the Hessian.
[in]coeff_indices_GCoefficient indices where to evaluate the Jacobian of G.
Returns
Block-tensor with the Hessian with respect to the physical variables.

\[ H_{\mathbf{x}}(u) = J_{\boldsymbol{\xi}}(G)^{-T} \left( H_\boldsymbol{\xi}(u) - \sum_k \nabla_{\mathbf{x},k}u H_{\boldsymbol{\xi}}(G_k) \right) J_{\boldsymbol{\xi}}(G)^{-1} , \quad \mathbf{x} = G(\boldsymbol{\xi}) \]

◆ ihess() [4/4]

template<typename BSplineCore >
template<bool memory_optimized = false, typename Geometry >
auto iganet::BSplineCommon< BSplineCore >::ihess ( const Geometry  G,
const utils::TensorArray< BSplineCore::parDim_ > &  xi,
const utils::TensorArray< BSplineCore::parDim_ > &  knot_indices,
const utils::TensorArray< Geometry::parDim()> &  knot_indices_G 
) const
inline

Returns a block-tensor with the Hessian of the B-spline object in the points xi with respect to the physical variables.

Template Parameters
GeometryType of the geometry B-spline object.
Parameters
[in]GB-spline geometry object.
[in]xiPoint(s) where to evaluate the Hessian.
[in]knot_indicesKnot indices where to evaluate the Hessian.
[in]knot_indices_GKnot indices where to evaluate Jacobian of G.
Returns
Block-tensor with the Hessian with respect to the physical variables.

\[ H_{\mathbf{x}}(u) = J_{\boldsymbol{\xi}}(G)^{-T} \left( H_\boldsymbol{\xi}(u) - \sum_k \nabla_{\mathbf{x},k}u H_{\boldsymbol{\xi}}(G_k) \right) J_{\boldsymbol{\xi}}(G)^{-1} , \quad \mathbf{x} = G(\boldsymbol{\xi}) \]

◆ ijac() [1/4]

template<typename BSplineCore >
template<bool memory_optimized = false, typename Geometry >
auto iganet::BSplineCommon< BSplineCore >::ijac ( const Geometry &  G,
const torch::Tensor &  xi 
) const
inline

Returns a block-tensor with the Jacobian of the B-spline object in the points xi with respect to the physical variables.

Template Parameters
GeometryType of the geometry B-spline object.
Parameters
[in]GB-spline geometry object.
[in]xiPoint(s) where to evaluate the Jacobian.
Returns
Block-tensor with the Jacobian with respect to the parametric variables.

\[ J_{\mathbf{x}}(u) = J_{\boldsymbol{\xi}}(u) \, J_{\boldsymbol{\xi}}(G)^{-T} , \quad \mathbf{x} = G(\boldsymbol{\xi}) \]

◆ ijac() [2/4]

template<typename BSplineCore >
template<bool memory_optimized = false, typename Geometry >
auto iganet::BSplineCommon< BSplineCore >::ijac ( const Geometry &  G,
const utils::TensorArray< BSplineCore::parDim_ > &  xi 
) const
inline

Provides the ijac operation.

Template Parameters
memory_optimizedTemplate parameter memory_optimized.
GeometryTemplate parameter Geometry.
Parameters
GValue of G.
xiParametric coordinates.
Returns
Result of the operation.

◆ ijac() [3/4]

template<typename BSplineCore >
template<bool memory_optimized = false, typename Geometry >
auto iganet::BSplineCommon< BSplineCore >::ijac ( const Geometry &  G,
const utils::TensorArray< BSplineCore::parDim_ > &  xi,
const utils::TensorArray< BSplineCore::parDim_ > &  knot_indices,
const torch::Tensor &  coeff_indices,
const utils::TensorArray< Geometry::parDim()> &  knot_indices_G,
const torch::Tensor &  coeff_indices_G 
) const
inline

Returns a block-tensor with the Jacobian of the B-spline object in the points xi with respect to the physical variables.

Template Parameters
GeometryType of the geometry B-spline object.
Parameters
[in]GB-spline geometry object.
[in]xiPoint(s) where to evaluate the Jacobian.
[in]knot_indicesKnot indices where to evaluate the Jacobain.
[in]knot_indices_GKnot indices where to evaluate the Jacobian of G.
[in]coeff_indicesCoefficient indices where to evaluate the Jacobian.
[in]coeff_indices_GCoefficient indices where to evaluate the Jacobian of G.
Returns
Block-tensor with the Jacobian with respect to the physical variables.

\[ J_{\mathbf{x}}(u) = J_{\boldsymbol{\xi}}(u) \, J_{\boldsymbol{\xi}}(G)^{-T} , \quad \mathbf{x} = G(\boldsymbol{\xi}) \]

◆ ijac() [4/4]

template<typename BSplineCore >
template<bool memory_optimized = false, typename Geometry >
auto iganet::BSplineCommon< BSplineCore >::ijac ( const Geometry  G,
const utils::TensorArray< BSplineCore::parDim_ > &  xi,
const utils::TensorArray< BSplineCore::parDim_ > &  knot_indices,
const utils::TensorArray< Geometry::parDim()> &  knot_indices_G 
) const
inline

Returns a block-tensor with the Jacobian of the B-spline object in the points xi with respect to the physical variables.

Template Parameters
GeometryType of the geometry B-spline object.
Parameters
[in]GB-spline geometry object.
[in]xiPoint(s) where to evaluate the Jacobian.
[in]knot_indicesKnot indices where to evaluate the Jacobian.
[in]knot_indices_GKnot indices where to evaluate the Jacobian of G.
Returns
Block-tensor with the Jacobian with respect to the physical variables.

\[ J_{\mathbf{x}}(u) = J_{\boldsymbol{\xi}}(u) \, J_{\boldsymbol{\xi}}(G)^{-T} , \quad \mathbf{x} = G(\boldsymbol{\xi}) \]

◆ ilapl() [1/4]

template<typename BSplineCore >
template<bool memory_optimized = false, typename Geometry >
auto iganet::BSplineCommon< BSplineCore >::ilapl ( const Geometry &  G,
const torch::Tensor &  xi 
) const
inline

Returns a block-tensor with the Laplacian of the B-spline object in the points xi with respect to the physical variables.

Template Parameters
GeometryType of the geometry B-spline object.
Parameters
[in]GB-spline geometry object.
[in]xiPoint(s) where to evaluate the Laplacian.
Returns
Block-tensor with the Laplacian with respect to the parametric variables.

\[ L_{\mathbf{x}}(u) = \text{trace} \left( J_{\boldsymbol{\xi}}(G)^{-T} \left( H_\boldsymbol{\xi}(u) - \sum_k \nabla_{\mathbf{x},k}u H_{\boldsymbol{\xi}}(G_k) \right) J_{\boldsymbol{\xi}}(G)^{-1} \right), \quad \mathbf{x} = G(\boldsymbol{\xi}) \]

◆ ilapl() [2/4]

template<typename BSplineCore >
template<bool memory_optimized = false, typename Geometry >
auto iganet::BSplineCommon< BSplineCore >::ilapl ( const Geometry &  G,
const utils::TensorArray< BSplineCore::parDim_ > &  xi 
) const
inline

Provides the ilapl operation.

Template Parameters
memory_optimizedTemplate parameter memory_optimized.
GeometryTemplate parameter Geometry.
Parameters
GValue of G.
xiParametric coordinates.
Returns
Result of the operation.

◆ ilapl() [3/4]

template<typename BSplineCore >
template<bool memory_optimized = false, typename Geometry >
auto iganet::BSplineCommon< BSplineCore >::ilapl ( const Geometry &  G,
const utils::TensorArray< BSplineCore::parDim_ > &  xi,
const utils::TensorArray< BSplineCore::parDim_ > &  knot_indices,
const torch::Tensor &  coeff_indices,
const utils::TensorArray< Geometry::parDim()> &  knot_indices_G,
const torch::Tensor &  coeff_indices_G 
) const
inline

Returns a block-tensor with the Laplacian of the B-spline object in the points xi with respect to the physical variables.

Template Parameters
GeometryType of the geometry B-spline object.
Parameters
[in]GB-spline geometry object.
[in]xiPoint(s) where to evaluate the Laplacian.
[in]knot_indicesKnot indices where to evaluate the Laplacian.
[in]knot_indices_GKnot indices where to evaluate the Jacobian of G.
[in]coeff_indicesCoefficient indices where to evaluate the Laplacian.
[in]coeff_indices_GCoefficient indices where to evaluate the Jacobian of G.
Returns
Block-tensor with the Laplacian with respect to the physical variables.

\[ L_{\mathbf{x}}(u) = \text{trace} \left( J_{\boldsymbol{\xi}}(G)^{-T} \left( H_\boldsymbol{\xi}(u) - \sum_k \nabla_{\mathbf{x},k}u H_{\boldsymbol{\xi}}(G_k) \right) J_{\boldsymbol{\xi}}(G)^{-1} \right), \quad \mathbf{x} = G(\boldsymbol{\xi}) \]

◆ ilapl() [4/4]

template<typename BSplineCore >
template<bool memory_optimized = false, typename Geometry >
auto iganet::BSplineCommon< BSplineCore >::ilapl ( const Geometry  G,
const utils::TensorArray< BSplineCore::parDim_ > &  xi,
const utils::TensorArray< BSplineCore::parDim_ > &  knot_indices,
const utils::TensorArray< Geometry::parDim()> &  knot_indices_G 
) const
inline

Returns a block-tensor with the Laplacian of the B-spline object in the points xi with respect to the physical variables.

Template Parameters
GeometryType of the geometry B-spline object.
Parameters
[in]GB-spline geometry object.
[in]xiPoint(s) where to evaluate the Laplacian.
[in]knot_indicesKnot indices where to evaluate the Laplacian.
[in]knot_indices_GKnot indices where to evaluate Jacobian of G.
Returns
Block-tensor with the Laplacian with respect to the physical variables.

\[ L_{\mathbf{x}}(u) = \text{trace} \left( J_{\boldsymbol{\xi}}(G)^{-T} \left( H_\boldsymbol{\xi}(u) - \sum_k \nabla_{\mathbf{x},k}u H_{\boldsymbol{\xi}}(G_k) \right) J_{\boldsymbol{\xi}}(G)^{-1} \right), \quad \mathbf{x} = G(\boldsymbol{\xi}) \]

◆ jac() [1/4]

template<typename BSplineCore >
template<bool memory_optimized = false>
auto iganet::BSplineCommon< BSplineCore >::jac ( const torch::Tensor &  xi) const
inline

Returns a block-tensor with the Jacobian of the B-spline object in the points xi with respect to the parametric variables.

Parameters
[in]xiPoint(s) where to evaluate the Jacobian.
Returns
Block-tensor with the Jacobian with respect to the parametric variables.

\[ J_{\boldsymbol{\xi}}(u) = \begin{bmatrix} \frac{\partial u_0}{\partial \xi_0}& \frac{\partial u_0}{\partial \xi_1}& \dots& \frac{\partial u_0}{\partial \xi_{d_\text{par}}} \\ \frac{\partial u_1}{\partial \xi_0}& \frac{\partial u_1}{\partial \xi_1}& \dots& \frac{\partial u_1}{\partial \xi_{d_\text{par}}} \\ \vdots& \vdots & \ddots & \vdots \\ \frac{\partial u_{d_\text{geo}}}{\partial \xi_0}& \frac{\partial u_{d_\text{geo}}}{\partial \xi_1}& \dots& \frac{\partial u_{d_\text{geo}}}{\partial \xi_{d_\text{par}}} \end{bmatrix} \]

◆ jac() [2/4]

template<typename BSplineCore >
template<bool memory_optimized = false>
auto iganet::BSplineCommon< BSplineCore >::jac ( const utils::TensorArray< BSplineCore::parDim_ > &  xi) const
inline

Provides the jac operation.

Template Parameters
memory_optimizedTemplate parameter memory_optimized.
Parameters
xiParametric coordinates.
Returns
Result of the operation.

◆ jac() [3/4]

template<typename BSplineCore >
template<bool memory_optimized = false>
auto iganet::BSplineCommon< BSplineCore >::jac ( const utils::TensorArray< BSplineCore::parDim_ > &  xi,
const utils::TensorArray< BSplineCore::parDim_ > &  knot_indices 
) const
inline

Returns a block-tensor with the Jacobian of the B-spline object in the points xi with respect to the parametric variables.

Parameters
[in]xiPoint(s) where to evaluate the Jacobian.
[in]knot_indicesKnot indices where to evaluate the Jacobian.
Returns
Block-tensor with the Jacobian with respect to the parametric variables.

\[ J_{\boldsymbol{\xi}}(u) = \begin{bmatrix} \frac{\partial u_0}{\partial \xi_0}& \frac{\partial u_0}{\partial \xi_1}& \dots& \frac{\partial u_0}{\partial \xi_{d_\text{par}}} \\ \frac{\partial u_1}{\partial \xi_0}& \frac{\partial u_1}{\partial \xi_1}& \dots& \frac{\partial u_1}{\partial \xi_{d_\text{par}}} \\ \vdots& \vdots & \ddots & \vdots \\ \frac{\partial u_{d_\text{geo}}}{\partial \xi_0}& \frac{\partial u_{d_\text{geo}}}{\partial \xi_1}& \dots& \frac{\partial u_{d_\text{geo}}}{\partial \xi_{d_\text{par}}} \end{bmatrix} \]

◆ jac() [4/4]

template<typename BSplineCore >
template<bool memory_optimized = false>
auto iganet::BSplineCommon< BSplineCore >::jac ( const utils::TensorArray< BSplineCore::parDim_ > &  xi,
const utils::TensorArray< BSplineCore::parDim_ > &  knot_indices,
const torch::Tensor &  coeff_indices 
) const
inline

Returns a block-tensor with the Jacobian of the B-spline object in the points xi with respect to the parametric variables.

Parameters
[in]xiPoint(s) where to evaluate the Jacobian.
[in]knot_indicesKnot indices where to evaluate the Jacobian.
[in]coeff_indicesCoefficient indices where to evaluate the Jacobian.
Returns
Block-tensor with the Jacobian with respect to the parametric variables.

\[ J_{\boldsymbol{\xi}}(u) = \begin{bmatrix} \frac{\partial u_0}{\partial \xi_0}& \frac{\partial u_0}{\partial \xi_1}& \dots& \frac{\partial u_0}{\partial \xi_{d_\text{par}}} \\ \frac{\partial u_1}{\partial \xi_0}& \frac{\partial u_1}{\partial \xi_1}& \dots& \frac{\partial u_1}{\partial \xi_{d_\text{par}}} \\ \vdots& \vdots & \ddots & \vdots \\ \frac{\partial u_{d_\text{geo}}}{\partial \xi_0}& \frac{\partial u_{d_\text{geo}}}{\partial \xi_1}& \dots& \frac{\partial u_{d_\text{geo}}}{\partial \xi_{d_\text{par}}} \end{bmatrix} \]

Note
Since the B-spline evaluation function computes the specified derivatives for all variables simultaneously we compute the transpose of the Jacobian and return its tranposed, hence, the Jacobian.

◆ lapl() [1/4]

template<typename BSplineCore >
template<bool memory_optimized = false>
auto iganet::BSplineCommon< BSplineCore >::lapl ( const torch::Tensor &  xi) const
inline

Returns a block-tensor with the Laplacian of the B-spline object in the points xi with respect to the parametric variables.

Parameters
[in]xiPoint(s) where to evaluate the Laplacian.
Returns
Block-tensor with the Laplacian with respect to the parametric variables xi.

\[ L_{\boldsymbol{\xi}}(u) = \sum_{i,j=0\atop|i+j|=2}^2 \frac{\partial^2 u}{\partial \xi_i\partial \xi_{j}} \]

Note
If the B-spline object has geometric dimension larger then one then all Laplacians are returned as a vector.

◆ lapl() [2/4]

template<typename BSplineCore >
template<bool memory_optimized = false>
auto iganet::BSplineCommon< BSplineCore >::lapl ( const utils::TensorArray< BSplineCore::parDim_ > &  xi) const
inline

Provides the lapl operation.

Template Parameters
memory_optimizedTemplate parameter memory_optimized.
Parameters
xiParametric coordinates.
Returns
Result of the operation.

◆ lapl() [3/4]

template<typename BSplineCore >
template<bool memory_optimized = false>
auto iganet::BSplineCommon< BSplineCore >::lapl ( const utils::TensorArray< BSplineCore::parDim_ > &  xi,
const utils::TensorArray< BSplineCore::parDim_ > &  knot_indices 
) const
inline

Returns a block-tensor with the Laplacian of the B-spline object in the points xi with respect to the parametric variables.

Parameters
[in]xiPoint(s) where to evaluate the Laplacian.
[in]knot_indicesKnot indices where to evaluate the Laplacian.
Returns
Block-tensor with the Laplacian with respect to the parametric variables.

\[ L_{\boldsymbol{\xi}}(u) = \sum_{i,j=0\atop|i+j|=2}^2 \frac{\partial^2 u}{\partial \xi_i\partial \xi_{j}} \]

Note
If the B-spline object has geometric dimension larger then one then all Laplacian matrices are returned as a vector.

◆ lapl() [4/4]

template<typename BSplineCore >
template<bool memory_optimized = false>
auto iganet::BSplineCommon< BSplineCore >::lapl ( const utils::TensorArray< BSplineCore::parDim_ > &  xi,
const utils::TensorArray< BSplineCore::parDim_ > &  knot_indices,
const torch::Tensor &  coeff_indices 
) const
inline

Returns a block-tensor with the Laplacian of the B-spline object in the points xi with respect to the parametric variables.

Parameters
[in]xiPoint(s) where to evaluate the Laplacian.
[in]knot_indicesKnot indices where to evaluate the Laplacian.
[in]coeff_indicesCoefficient indices where to evaluate the Laplacian.
Returns
Block-tensor with the Laplacian with respect to the parametric variables.

\[ L_{\boldsymbol{\xi}}(u) = \sum_{i,j=0\atop|i+j|=2}^2 \frac{\partial^2 u}{\partial \xi_i\partial \xi_{j}} \]

Note
If the B-spline object has geometric dimension larger then one then all Laplacians are returned as a vector.

◆ make_shared() [1/6]

template<typename BSplineCore >
static Ptr iganet::BSplineCommon< BSplineCore >::make_shared ( const std::array< int64_t, BSplineCore::parDim_ > &  ncoeffs,
const utils::TensorArray< BSplineCore::geoDim_ > &  coeffs,
bool  clone = false,
Options< typename BSplineCore::value_type >  options = Options<typename BSplineCore::value_type>{} 
)
inlinestatic

Provides the make_shared operation.

Parameters
ncoeffsValue of ncoeffs.
coeffsValue of coeffs.
cloneValue of clone.
optionsConfiguration options.
Returns
Result of the operation.

◆ make_shared() [2/6]

template<typename BSplineCore >
static Ptr iganet::BSplineCommon< BSplineCore >::make_shared ( const std::array< int64_t, BSplineCore::parDim_ > &  ncoeffs,
enum init  init = init::greville,
Options< typename BSplineCore::value_type >  options = Options<typename BSplineCore::value_type>{} 
)
inlinestatic

Provides the make_shared operation.

Parameters
ncoeffsValue of ncoeffs.
initValue of init.
optionsConfiguration options.
Returns
Result of the operation.

◆ make_shared() [3/6]

template<typename BSplineCore >
static Ptr iganet::BSplineCommon< BSplineCore >::make_shared ( const std::array< int64_t, BSplineCore::parDim_ > &  ncoeffs,
utils::TensorArray< BSplineCore::geoDim_ > &&  coeffs,
Options< typename BSplineCore::value_type >  options = Options<typename BSplineCore::value_type>{} 
)
inlinestatic

Provides the make_shared operation.

Parameters
ncoeffsValue of ncoeffs.
coeffsValue of coeffs.
optionsConfiguration options.
Returns
Result of the operation.

◆ make_shared() [4/6]

template<typename BSplineCore >
static Ptr iganet::BSplineCommon< BSplineCore >::make_shared ( const std::array< std::vector< typename BSplineCore::value_type >, BSplineCore::parDim_ > &  kv,
const utils::TensorArray< BSplineCore::geoDim_ > &  coeffs,
bool  clone = false,
Options< typename BSplineCore::value_type >  options = Options<typename BSplineCore::value_type>{} 
)
inlinestatic

Provides the make_shared operation.

Parameters
kvValue of kv.
coeffsValue of coeffs.
cloneValue of clone.
optionsConfiguration options.
Returns
Result of the operation.

◆ make_shared() [5/6]

template<typename BSplineCore >
static Ptr iganet::BSplineCommon< BSplineCore >::make_shared ( const std::array< std::vector< typename BSplineCore::value_type >, BSplineCore::parDim_ > &  kv,
enum init  init = init::greville,
Options< typename BSplineCore::value_type >  options = Options<typename BSplineCore::value_type>{} 
)
inlinestatic

Provides the make_shared operation.

Parameters
kvValue of kv.
initValue of init.
optionsConfiguration options.
Returns
Result of the operation.

◆ make_shared() [6/6]

template<typename BSplineCore >
static Ptr iganet::BSplineCommon< BSplineCore >::make_shared ( Options< typename BSplineCore::value_type >  options = Options<typename BSplineCore::value_type>{})
inlinestatic

Creates a new B-spline object as shared pointer.

Parameters
optionsConfiguration options.
Returns
Result of the operation.

◆ make_unique() [1/6]

template<typename BSplineCore >
static Ptr iganet::BSplineCommon< BSplineCore >::make_unique ( const std::array< int64_t, BSplineCore::parDim_ > &  ncoeffs,
const utils::TensorArray< BSplineCore::geoDim_ > &  coeffs,
bool  clone = false,
Options< typename BSplineCore::value_type >  options = Options<typename BSplineCore::value_type>{} 
)
inlinestatic

Provides the make_unique operation.

Parameters
ncoeffsValue of ncoeffs.
coeffsValue of coeffs.
cloneValue of clone.
optionsConfiguration options.
Returns
Result of the operation.

◆ make_unique() [2/6]

template<typename BSplineCore >
static Ptr iganet::BSplineCommon< BSplineCore >::make_unique ( const std::array< int64_t, BSplineCore::parDim_ > &  ncoeffs,
enum init  init = init::greville,
Options< typename BSplineCore::value_type >  options = Options<typename BSplineCore::value_type>{} 
)
inlinestatic

Provides the make_unique operation.

Parameters
ncoeffsValue of ncoeffs.
initValue of init.
optionsConfiguration options.
Returns
Result of the operation.

◆ make_unique() [3/6]

template<typename BSplineCore >
static Ptr iganet::BSplineCommon< BSplineCore >::make_unique ( const std::array< int64_t, BSplineCore::parDim_ > &  ncoeffs,
utils::TensorArray< BSplineCore::geoDim_ > &&  coeffs,
Options< typename BSplineCore::value_type >  options = Options<typename BSplineCore::value_type>{} 
)
inlinestatic

Provides the make_unique operation.

Parameters
ncoeffsValue of ncoeffs.
coeffsValue of coeffs.
optionsConfiguration options.
Returns
Result of the operation.

◆ make_unique() [4/6]

template<typename BSplineCore >
static Ptr iganet::BSplineCommon< BSplineCore >::make_unique ( const std::array< std::vector< typename BSplineCore::value_type >, BSplineCore::parDim_ > &  kv,
const utils::TensorArray< BSplineCore::geoDim_ > &  coeffs,
bool  clone = false,
Options< typename BSplineCore::value_type >  options = Options<typename BSplineCore::value_type>{} 
)
inlinestatic

Provides the make_unique operation.

Parameters
kvValue of kv.
coeffsValue of coeffs.
cloneValue of clone.
optionsConfiguration options.
Returns
Result of the operation.

◆ make_unique() [5/6]

template<typename BSplineCore >
static Ptr iganet::BSplineCommon< BSplineCore >::make_unique ( const std::array< std::vector< typename BSplineCore::value_type >, BSplineCore::parDim_ > &  kv,
enum init  init = init::greville,
Options< typename BSplineCore::value_type >  options = Options<typename BSplineCore::value_type>{} 
)
inlinestatic

Provides the make_unique operation.

Parameters
kvValue of kv.
initValue of init.
optionsConfiguration options.
Returns
Result of the operation.

◆ make_unique() [6/6]

template<typename BSplineCore >
static Ptr iganet::BSplineCommon< BSplineCore >::make_unique ( Options< typename BSplineCore::value_type >  options = Options<typename BSplineCore::value_type>{})
inlinestatic

Creates a new B-spline object as unique pointer.

Parameters
optionsConfiguration options.
Returns
Result of the operation.

◆ norm()

template<typename BSplineCore >
auto iganet::BSplineCommon< BSplineCore >::norm ( ) const
inline

Computes the norm of the B-spline object by computing the mean-squared sum of the function values evaluated at the Greville abscissae.

Returns
Result of the operation.

◆ nv() [1/4]

template<typename BSplineCore >
template<bool memory_optimized = false>
auto iganet::BSplineCommon< BSplineCore >::nv ( const torch::Tensor &  xi) const
inline

Returns a block-tensor with the outward pointing normal vector of the B-spline object.

Parameters
[in]xiPoint(s) where to evaluate the normal vector.
Returns
Block-tensor with the outward pointing normal vector

◆ nv() [2/4]

template<typename BSplineCore >
template<bool memory_optimized = false>
auto iganet::BSplineCommon< BSplineCore >::nv ( const utils::TensorArray< BSplineCore::parDim_ > &  xi) const
inline

Provides the nv operation.

Template Parameters
memory_optimizedTemplate parameter memory_optimized.
memory_optimizedTemplate parameter memory_optimized.
Parameters
xiParametric coordinates.
Returns
Result of the operation.

◆ nv() [3/4]

template<typename BSplineCore >
template<bool memory_optimized = false>
auto iganet::BSplineCommon< BSplineCore >::nv ( const utils::TensorArray< BSplineCore::parDim_ > &  xi,
const utils::TensorArray< BSplineCore::parDim_ > &  knot_indices 
) const
inline

Returns a block-tensor with the outward pointing normal vector of the B-spline object.

Parameters
[in]xiPoint(s) where to evaluate the normal vector.
[in]knot_indicesKnot indices where to evaluate the normal vector.
Returns
Block-tensor with the outward pointing normal vector.

◆ nv() [4/4]

template<typename BSplineCore >
template<bool memory_optimized = false>
auto iganet::BSplineCommon< BSplineCore >::nv ( const utils::TensorArray< BSplineCore::parDim_ > &  xi,
const utils::TensorArray< BSplineCore::parDim_ > &  knot_indices,
const torch::Tensor &  coeff_indices 
) const
inline

Returns a block-tensor with the outward pointing normal vector of the B-spline object.

Parameters
[in]xiPoint(s) where to evaluate the normal vector.
[in]knot_indicesKnot indices where to evaluate the normal vector.
[in]coeff_indicesCoefficient indices where to evaluate the normal vector.
Returns
Block-tensor with the outward pointing normal vector.

◆ operator*() [1/2]

template<typename BSplineCore >
BSplineCommon iganet::BSplineCommon< BSplineCore >::operator* ( BSplineCore::value_type  s) const
inline

Returns a new B-spline object whose coefficients are scaled by a scalar.

Parameters
sValue of s.
Returns
Result of the operation.

◆ operator*() [2/2]

template<typename BSplineCore >
BSplineCommon iganet::BSplineCommon< BSplineCore >::operator* ( std::array< typename BSplineCore::value_type, BSplineCore::geoDim()>  v) const
inline

Returns a new B-spline object whose coefficients are scaled by a vector.

Parameters
vValue of v.
Returns
Result of the operation.

◆ operator*=() [1/2]

template<typename BSplineCore >
BSplineCommon & iganet::BSplineCommon< BSplineCore >::operator*= ( BSplineCore::value_type  s)
inline

Scales the coefficients by a scalar.

Parameters
sValue of s.
Returns
Result of the operation.

◆ operator*=() [2/2]

template<typename BSplineCore >
BSplineCommon & iganet::BSplineCommon< BSplineCore >::operator*= ( std::array< typename BSplineCore::value_type, BSplineCore::geoDim()>  v)
inline

Scales the coefficients by a vector.

Parameters
vValue of v.
Returns
Result of the operation.

◆ operator+()

template<typename BSplineCore >
BSplineCommon iganet::BSplineCommon< BSplineCore >::operator+ ( const BSplineCommon< BSplineCore > &  other) const
inline

Returns a new B-spline object whose coefficients are the sum of that of two compatible B-spline objects.

Note
This method does not check if the knot vectors of the two B-spline objects are compatible. It simply adds the two coefficients arrays and throws an error if their sizes do not match. Any compatibility checks must be performed outside.
Parameters
otherSecond input value.
Returns
Result of the operation.

◆ operator+=()

template<typename BSplineCore >
BSplineCommon & iganet::BSplineCommon< BSplineCore >::operator+= ( const BSplineCommon< BSplineCore > &  other)
inline

Adds the coefficients of another B-spline object.

Note
This method does not check if the knot vectors of the two B-spline objects are compatible. It simply adds the two coefficients arrays and throws an error if their sizes do not match. Any compatibility checks must be performed outside.
Parameters
otherSecond input value.
Returns
Result of the operation.

◆ operator-()

template<typename BSplineCore >
BSplineCommon iganet::BSplineCommon< BSplineCore >::operator- ( const BSplineCommon< BSplineCore > &  other) const
inline

Returns a new B-spline object whose coefficients are the difference of that of two compatible B-spline objects.

Note
This method does not check if the knot vectors of the two B-spline objects are compatible. It simply subtracts the coefficients arrays of two B-spline objects from each other and throws an error if their sizes do not match. Any compatibility checks must be performed outside.
Parameters
otherSecond input value.
Returns
Result of the operation.

◆ operator-=()

template<typename BSplineCore >
BSplineCommon & iganet::BSplineCommon< BSplineCore >::operator-= ( const BSplineCommon< BSplineCore > &  other)
inline

Substracts the coefficients of another B-spline object.

Note
This method does not check if the knot vectors of the two B-spline objects are compatible. It simply substracts the two coefficients arrays and throws an error if their sizes do not match. Any compatibility checks must be performed outside.
Parameters
otherSecond input value.
Returns
Result of the operation.

◆ operator/() [1/2]

template<typename BSplineCore >
BSplineCommon iganet::BSplineCommon< BSplineCore >::operator/ ( BSplineCore::value_type  s) const
inline

Returns a new B-spline object whose coefficients are scaled by a scalar.

Parameters
sValue of s.
Returns
Result of the operation.

◆ operator/() [2/2]

template<typename BSplineCore >
BSplineCommon iganet::BSplineCommon< BSplineCore >::operator/ ( std::array< typename BSplineCore::value_type, BSplineCore::geoDim()>  v) const
inline

Returns a new B-spline object whose coefficients are scaled by a vector.

Parameters
vValue of v.
Returns
Result of the operation.

◆ operator/=() [1/2]

template<typename BSplineCore >
BSplineCommon & iganet::BSplineCommon< BSplineCore >::operator/= ( BSplineCore::value_type  s)
inline

Scales the coefficients by a scalar.

Parameters
sValue of s.
Returns
Result of the operation.

◆ operator/=() [2/2]

template<typename BSplineCore >
BSplineCommon & iganet::BSplineCommon< BSplineCore >::operator/= ( std::array< typename BSplineCore::value_type, BSplineCore::geoDim()>  v)
inline

Scales the coefficients by a vector.

Parameters
vValue of v.
Returns
Result of the operation.

◆ plot() [1/6]

template<typename BSplineCore >
template<typename Backend = void, typename BSplineCoreColor >
auto iganet::BSplineCommon< BSplineCore >::plot ( const BSplineCommon< BSplineCoreColor > &  color,
const nlohmann::json &  json = {} 
) const
inline

Plots the B-spline object colored by another B-spline object.

Parameters
[in]colorB-spline object representing the color.
[in]jsonJSON configuration.
Returns
Plot of the B-spline object.

◆ plot() [2/6]

template<typename BSplineCore >
template<typename Backend = void, typename BSplineCoreColor >
auto iganet::BSplineCommon< BSplineCore >::plot ( const BSplineCommon< BSplineCoreColor > &  color,
const std::initializer_list< utils::TensorArray< BSplineCore::parDim_ > > &  xi,
const nlohmann::json &  json = {} 
) const
inline

Plots the B-spline object colored by another B-spline object together with a set of sampling points.

Parameters
[in]colorB-spline object representing the color.
[in]xiVector of sampling points.
[in]jsonJSON configuration.
Returns
Plot of the B-spline object.

◆ plot() [3/6]

template<typename BSplineCore >
template<typename Backend = void, typename BSplineCoreColor >
auto iganet::BSplineCommon< BSplineCore >::plot ( const BSplineCommon< BSplineCoreColor > &  color,
const utils::TensorArray< BSplineCore::parDim_ > &  xi,
const nlohmann::json &  json = {} 
) const
inline

Plots the B-spline object colored by another B-spline object together with a set of sampling points.

Parameters
[in]colorB-spline object representing the color.
[in]xiSampling points.
[in]jsonJSON configuration.
Returns
Plot of the B-spline object.

◆ plot() [4/6]

template<typename BSplineCore >
template<typename Backend = void>
auto iganet::BSplineCommon< BSplineCore >::plot ( const nlohmann::json &  json = {}) const
inline

Plots the B-spline object.

Parameters
[in]jsonJSON configuration.
Returns
Plot of the B-spline object.

◆ plot() [5/6]

template<typename BSplineCore >
template<typename Backend = void>
auto iganet::BSplineCommon< BSplineCore >::plot ( const std::initializer_list< utils::TensorArray< BSplineCore::parDim_ > > &  xi,
const nlohmann::json &  json = {} 
) const
inline

Plots the B-spline object together with a set of sampling points.

Parameters
[in]xiVector of sampling points.
[in]jsonJSON configuration.
Returns
Plot of the B-spline object.

◆ plot() [6/6]

template<typename BSplineCore >
template<typename Backend = void>
auto iganet::BSplineCommon< BSplineCore >::plot ( const utils::TensorArray< BSplineCore::parDim_ > &  xi,
const nlohmann::json &  json = {} 
) const
inline

Plots the B-spline object together with a set of sampling points.

Parameters
[in]xiSampling points.
[in]jsonJSON configuration.
Returns
Plot of the B-spline object.

◆ pretty_print()

template<typename BSplineCore >
void iganet::BSplineCommon< BSplineCore >::pretty_print ( std::ostream &  os) const
inlineoverridevirtualnoexcept

Returns a string representation of the BSplineCommon object.

Parameters
osOutput stream.

Implements iganet::utils::FullQualifiedName.

◆ rotate() [1/2]

template<typename BSplineCore >
auto iganet::BSplineCommon< BSplineCore >::rotate ( BSplineCore::value_type  angle) const
inline

Rotates the B-spline object by an angle in 2d.

Parameters
angleValue of angle.
Returns
Result of the operation.

◆ rotate() [2/2]

template<typename BSplineCore >
auto iganet::BSplineCommon< BSplineCore >::rotate ( std::array< typename BSplineCore::value_type, 3 >  angle) const
inline

Rotates the B-spline object by three angles in 3d.

Parameters
angleValue of angle.
Returns
Result of the operation.

◆ rotate_() [1/2]

template<typename BSplineCore >
auto iganet::BSplineCommon< BSplineCore >::rotate_ ( BSplineCore::value_type  angle)
inline

Rotates the B-spline object by an angle in 2d in-place.

Parameters
angleValue of angle.
Returns
Result of the operation.

◆ rotate_() [2/2]

template<typename BSplineCore >
auto iganet::BSplineCommon< BSplineCore >::rotate_ ( std::array< typename BSplineCore::value_type, 3 >  angle)
inline

Rotates the B-spline object by three angles in 3d in-place.

Parameters
angleValue of angle.
Returns
Result of the operation.

◆ scale() [1/2]

template<typename BSplineCore >
auto iganet::BSplineCommon< BSplineCore >::scale ( BSplineCore::value_type  s,
int  dim = -1 
) const
inline

Scales the B-spline object by a scalar.

Parameters
sValue of s.
dimValue of dim.
Returns
Result of the operation.

◆ scale() [2/2]

template<typename BSplineCore >
auto iganet::BSplineCommon< BSplineCore >::scale ( std::array< typename BSplineCore::value_type, BSplineCore::geoDim()>  v) const
inline

Scales the B-spline object by a vector.

Parameters
vValue of v.
Returns
Result of the operation.

◆ scale_() [1/2]

template<typename BSplineCore >
auto iganet::BSplineCommon< BSplineCore >::scale_ ( BSplineCore::value_type  s,
int  dim = -1 
)
inline

Scales the B-spline object by a scalar in-place.

Parameters
sValue of s.
dimValue of dim.
Returns
Result of the operation.

◆ scale_() [2/2]

template<typename BSplineCore >
auto iganet::BSplineCommon< BSplineCore >::scale_ ( std::array< typename BSplineCore::value_type, BSplineCore::geoDim()>  v)
inline

Scales the B-spline object by a vector in-place.

Parameters
vValue of v.
Returns
Result of the operation.

◆ to() [1/3]

template<typename BSplineCore >
template<typename real_t >
auto iganet::BSplineCommon< BSplineCore >::to ( ) const
inline

Returns a copy of the B-spline object with real_t type.

Template Parameters
real_tTemplate parameter real_t.
Returns
Result of the operation.

◆ to() [2/3]

template<typename BSplineCore >
template<typename real_t >
auto iganet::BSplineCommon< BSplineCore >::to ( Options< real_t >  options) const
inline

Returns a copy of the B-spline object with settings from options.

Template Parameters
real_tTemplate parameter real_t.
Parameters
optionsConfiguration options.
Returns
Result of the operation.

◆ to() [3/3]

template<typename BSplineCore >
auto iganet::BSplineCommon< BSplineCore >::to ( torch::Device  device) const
inline

Returns a copy of the B-spline object with settings from device.

Parameters
deviceTarget device.
Returns
Result of the operation.

◆ to_nonuniform()

template<typename BSplineCore >
auto iganet::BSplineCommon< BSplineCore >::to_nonuniform ( ) &&
inline

Converts a uniform B-spline into a non-uniform B-spline.

All run-time state is moved into the returned object. Consequently, this operation is only available for rvalues and leaves the source object in a valid but unspecified state.

Returns
Result of the operation.

◆ to_uniform()

template<typename BSplineCore >
auto iganet::BSplineCommon< BSplineCore >::to_uniform ( ) &&
inline

Converts a non-uniform B-spline into a uniform B-spline.

The conversion succeeds only if all knot vectors are canonical open uniform knot vectors. Validation is performed before any state is moved.

Returns
Result of the operation.

◆ translate()

template<typename BSplineCore >
auto iganet::BSplineCommon< BSplineCore >::translate ( std::array< typename BSplineCore::value_type, BSplineCore::geoDim()>  v) const
inline

Translates the B-spline object by a vector.

Parameters
vValue of v.
Returns
Result of the operation.

◆ translate_()

template<typename BSplineCore >
auto iganet::BSplineCommon< BSplineCore >::translate_ ( std::array< typename BSplineCore::value_type, BSplineCore::geoDim()>  v)
inline

Translates the B-spline object by a vector in-place.

Parameters
vValue of v.
Returns
Result of the operation.

◆ uniform_refine()

template<typename BSplineCore >
BSplineCommon & iganet::BSplineCommon< BSplineCore >::uniform_refine ( int  numRefine = 1,
int  dim = -1 
)
inline

Returns the B-spline object with uniformly refined knot and coefficient vectors.

If dim = -1, new knot values are inserted uniformly in each knot span in all spatial dimensions. Otherwise, i.e., dim != -1 new knots are only inserted in the specified dimension.

Parameters
numRefineValue of numRefine.
dimValue of dim.
Returns
Result of the operation.

The documentation for this class was generated from the following file: