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/bspline.hpp>

Inheritance diagram for iganet::BSplineCommon< BSplineCore >:
iganet::detail::SplineType 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< short_t >::type degree_elevate = 0>
using derived_type = BSplineCommon< typename BSplineCore::template derived_type< T, degree_elevate > >
 Deduces the type of the template 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< short_t >::type 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.
 
auto abs_diff (const BSplineCommon &other, int dim=-1)
 Computes the absolute difference between two compatible B-spline objects.
 
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)
 Computes the difference between two compatible B-spline objects.
 
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.
 
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.
 
BSplineCommon operator* (typename BSplineCore::value_type s) const
 Returns a new B-spline object whose coefficients are scaled by a scalar.
 
BSplineCommonoperator*= (std::array< typename BSplineCore::value_type, BSplineCore::geoDim()> v)
 Scales the coefficients by a vector.
 
BSplineCommonoperator*= (typename BSplineCore::value_type s)
 Scales the coefficients by a scalar.
 
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/ (std::array< typename BSplineCore::value_type, BSplineCore::geoDim()> v) const
 Returns a new B-spline object whose coefficients are scaled by a vector.
 
BSplineCommon operator/ (typename BSplineCore::value_type s) const
 Returns a new B-spline object whose coefficients are scaled by a scalar.
 
BSplineCommonoperator/= (std::array< typename BSplineCore::value_type, BSplineCore::geoDim()> v)
 Scales the coefficients by a vector.
 
BSplineCommonoperator/= (typename BSplineCore::value_type s)
 Scales the coefficients by a scalar.
 
template<typename Backend = void, typename BSplineCoreColor >
auto plot (const BSplineCommon< BSplineCoreColor > &color, const nlohmann::json &json={}) const
 
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
 
template<typename Backend = void, typename BSplineCoreColor >
auto plot (const BSplineCommon< BSplineCoreColor > &color, const utils::TensorArray< BSplineCore::parDim_ > &xi, const nlohmann::json &json={}) const
 
template<typename Backend = void>
auto plot (const nlohmann::json &json={}) const
 
template<typename Backend = void>
auto plot (const std::initializer_list< utils::TensorArray< BSplineCore::parDim_ > > &xi, const nlohmann::json &json={}) const
 
template<typename Backend = void>
auto plot (const utils::TensorArray< BSplineCore::parDim_ > &xi, const nlohmann::json &json={}) const
 
virtual void pretty_print (std::ostream &os=Log(log::info)) const noexcept override
 Returns a string representation of the BSplineCommon object.
 
auto rotate (std::array< typename BSplineCore::value_type, 3 > angle)
 Rotates the B-spline object by three angles in 3d.
 
auto rotate (typename BSplineCore::value_type angle)
 Rotates the B-spline object by an angle in 2d.
 
auto scale (std::array< typename BSplineCore::value_type, BSplineCore::geoDim()> v)
 Scales the B-spline object by a vector.
 
auto scale (typename BSplineCore::value_type s, int dim=-1)
 Scales the B-spline object by a scalar.
 
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 translate (std::array< typename BSplineCore::value_type, BSplineCore::geoDim()> v)
 Translates the B-spline object by a vector.
 
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 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>
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-spline. C++ suggests to 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< short_t >::type degree_elevate = 0>
using iganet::BSplineCommon< BSplineCore >::derived_type = BSplineCommon< typename BSplineCore::template derived_type<T, degree_elevate> >

Deduces the type of the template 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< short_t >::type 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/5]

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

Copy constructor.

◆ BSplineCommon() [2/5]

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

Copy/clone constructor.

◆ BSplineCommon() [3/5]

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.

◆ BSplineCommon() [4/5]

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

Move constructor.

◆ BSplineCommon() [5/5]

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

Move constructor with external coefficients.

Member Function Documentation

◆ 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.

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

◆ boundingBox()

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

Computes the bounding box of the B-spline object.

◆ clone()

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

Returns a clone of the B-spline object.

◆ 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

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() [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 
)
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

◆ 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

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() [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

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() [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

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() [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

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() [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

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() [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

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() [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

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() [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

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() [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

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() [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

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() [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

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() [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

Creates a new B-spline object as shared pointer.

◆ 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

Creates a new B-spline object as shared pointer.

◆ 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

Creates a new B-spline object as shared pointer.

◆ 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

Creates a new B-spline object as shared pointer.

◆ 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

Creates a new B-spline object as shared pointer.

◆ 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.

◆ 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

Creates a new B-spline object as unique pointer.

◆ 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

Creates a new B-spline object as unique pointer.

◆ 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

Creates a new B-spline object as unique pointer.

◆ 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

Creates a new B-spline object as unique pointer.

◆ 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

Creates a new B-spline object as unique pointer.

◆ 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.

◆ operator*() [1/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.

◆ operator*() [2/2]

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

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

◆ operator*=() [1/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.

◆ operator*=() [2/2]

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

Scales the coefficients by a scalar.

◆ 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.

◆ 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.

◆ 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.

◆ 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.

◆ operator/() [1/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.

◆ operator/() [2/2]

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

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

◆ operator/=() [1/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.

◆ operator/=() [2/2]

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

Scales the coefficients by a scalar.

◆ plot() [1/6]

template<typename BSplineCore >
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 >
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 >
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 >
virtual void iganet::BSplineCommon< BSplineCore >::pretty_print ( std::ostream &  os = Log(log::info)) const
inlineoverridevirtualnoexcept

Returns a string representation of the BSplineCommon object.

Implements iganet::utils::FullQualifiedName.

◆ rotate() [1/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.

◆ rotate() [2/2]

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

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

◆ scale() [1/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.

◆ scale() [2/2]

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

Scales the B-spline object by a scalar.

◆ 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.

◆ 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.

◆ 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.

◆ 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.

◆ 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.


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