Tensor-product non-uniform rational B-spline with non-uniform knot vectors (core functionality)
More...
|
template<typename other_t , short_t GeoDim_, short_t... Degrees_> |
using | derived_self_type = NonUniformNurbsCore< other_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 BSpline, std::make_signed< short_t >::type degree_elevate = 0> |
using | derived_type = BSpline< real_t, GeoDim,(Degrees+degree_elevate)... > |
| Deduces the type of the template template parameter BSpline 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.
|
|
template<typename other_t > |
using | real_derived_self_type = NonUniformNurbsCore< other_t, GeoDim, Degrees... > |
| 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 = typename Base::template derived_type< NonUniformNurbsCore, degree_elevate > |
| Deduces the self-type possibly degrees (de-)elevated by the additive constant degree_elevate
|
|
using | value_type = real_t |
| Value type.
|
|
using | derived_self_type = NonUniformBSplineCore< other_t, GeoDim_, Degrees_... > |
| Deduces the derived self-type when exposed to different class template parameters real_t and GeoDim , and the Degrees parameter pack.
|
|
using | derived_type = BSpline< real_t, GeoDim,(Degrees+degree_elevate)... > |
| Deduces the type of the template template parameter BSpline 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 | real_derived_self_type = NonUniformBSplineCore< other_t, GeoDim, Degrees... > |
| Deduces the derived self-type when exposed to a different class template parameter real_t
|
|
using | self_type = typename Base::template derived_type< NonUniformBSplineCore, degree_elevate > |
| Deduces the self-type possibly degrees (de-)elevated by the additive constant degree_elevate
|
|
using | value_type = real_t |
| Value type.
|
|
using | derived_self_type = UniformBSplineCore< other_t, GeoDim_, Degrees_... > |
| Deduces the derived self-type when exposed to different class template parameters real_t and GeoDim , and the Degrees parameter pack.
|
|
using | derived_type = BSpline< real_t, GeoDim,(Degrees+degree_elevate)... > |
| Deduces the type of the template template parameter BSpline 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 | real_derived_self_type = UniformBSplineCore< other_t, GeoDim, Degrees... > |
| Deduces the derived self-type when exposed to a different class template parameter real_t
|
|
using | self_type = derived_type< UniformBSplineCore, degree_elevate > |
| Deduces the self-type possibly degrees (de-)elevated by the additive constant degree_elevate
|
|
using | value_type = real_t |
| Value type.
|
|
|
| NonUniformBSplineCore (const std::array< std::vector< typename Base::value_type >, Base::parDim_ > &kv, const utils::TensorArray< Base::geoDim_ > &coeffs, bool clone=false, Options< real_t > options=Options< real_t >{}) |
| Constructor for non-equidistant knot vectors.
|
|
| NonUniformBSplineCore (const std::array< std::vector< typename Base::value_type >, Base::parDim_ > &kv, enum init init=init::greville, Options< real_t > options=Options< real_t >{}) |
| Constructor for non-equidistant knot vectors.
|
|
auto & | from_gismo (BSpline &bspline, bool, bool) |
|
NonUniformBSplineCore & | insert_knots (const utils::TensorArray< Base::parDim_ > &knots) |
| Returns the B-spline object with refined knot and coefficient vectors.
|
|
NonUniformBSplineCore & | reduce_continuity (int numReduce=1, int dim=-1) |
| Returns the B-spline object with updated knot and coefficient vectors with reduced continuity.
|
|
NonUniformBSplineCore & | uniform_refine (int numRefine=1, int dim=-1) |
| Returns the B-spline object with uniformly refined knot and coefficient vectors.
|
|
| UniformBSplineCore (const std::array< int64_t, parDim_ > &ncoeffs, const utils::TensorArray< geoDim_ > &coeffs, bool clone=false, Options< real_t > options=Options< real_t >{}) |
| Constructor for equidistant knot vectors.
|
|
| UniformBSplineCore (const std::array< int64_t, parDim_ > &ncoeffs, enum init init=init::greville, Options< real_t > options=Options< real_t >{}) |
| Constructor for equidistant knot vectors.
|
|
| UniformBSplineCore (const std::array< int64_t, parDim_ > &ncoeffs, utils::TensorArray< geoDim_ > &&coeffs, Options< real_t > options=Options< real_t >{}) |
| Constructor for equidistant knot vectors.
|
|
| UniformBSplineCore (const UniformBSplineCore< other_t, GeoDim, Degrees... > &other, Options< real_t > options=Options< real_t >{}) |
| Copy constructor.
|
|
| UniformBSplineCore (Options< real_t > options=Options< real_t >{}) |
| Default constructor.
|
|
torch::Tensor | as_tensor () const noexcept override |
| Returns all coefficients as a single tensor.
|
|
int64_t | as_tensor_size () const noexcept override |
| Returns the size of the single tensor representation of all coefficients.
|
|
const utils::TensorArray< geoDim_ > & | coeffs () const noexcept |
| Returns a constant reference to the array of coefficient vectors.
|
|
utils::TensorArray< geoDim_ > & | coeffs () noexcept |
| Returns a non-constant reference to the array of coefficient vectors.
|
|
const torch::Tensor & | coeffs (short_t i) const noexcept |
| Returns a constant reference to the coefficient vector in the \(i\)-th dimension.
|
|
torch::Tensor & | coeffs (short_t i) noexcept |
| Returns a non-constant reference to the coefficient vector in the \(i\)-th dimension.
|
|
nlohmann::json | coeffs_to_json () const |
| Returns the B-spline object's coefficients as JSON object.
|
|
utils::TensorArray< geoDim_ > | coeffs_view () const noexcept |
| Returns an array of views to the coefficient vectors.
|
|
const auto | coeffs_view (short_t i) const noexcept |
| Returns a view to the coefficient vector in the \(i\)-th dimension.
|
|
torch::Device | device () const noexcept override |
| Returns the device property.
|
|
int32_t | device_index () const noexcept override |
| Returns the device_index property.
|
|
torch::Dtype | dtype () const noexcept override |
| Returns the dtype property.
|
|
auto | eval (const utils::TensorArray< parDim_ > &xi, const utils::TensorArray< parDim_ > &knot_indices) const |
| Returns the value of the univariate B-spline object in the points xi
|
|
auto | eval (const utils::TensorArray< parDim_ > &xi, const utils::TensorArray< parDim_ > &knot_indices, const torch::Tensor &coeff_indices) const |
| Returns the value of the univariate B-spline object in the points xi
|
|
auto & | from_gismo (BSpline &bspline, bool, bool) |
|
UniformBSplineCore & | from_json (const nlohmann::json &json) |
| Updates the B-spline object from JSON object.
|
|
UniformBSplineCore & | from_tensor (const torch::Tensor &tensor) noexcept override |
| Sets all coefficients from a single tensor.
|
|
UniformBSplineCore & | from_xml (const pugi::xml_document &doc, int id=0, std::string label="", int index=-1) |
| Updates the B-spline object from XML object.
|
|
UniformBSplineCore & | from_xml (const pugi::xml_node &root, int id=0, std::string label="", int index=-1) |
| Updates the B-spline object from XML node.
|
|
auto | greville (bool interior=false) const |
| Returns the Greville abscissae.
|
|
void | init_coeffs (enum init init) |
| Initializes the B-spline coefficients.
|
|
void | init_knots () |
| Initializes the B-spline knots.
|
|
bool | is_sparse () const noexcept override |
| Returns true if the layout is sparse.
|
|
bool | isclose (const UniformBSplineCore< other_t, GeoDim_, Degrees_... > &other, real_t rtol=real_t{1e-5}, real_t atol=real_t{1e-8}) const |
| Returns true if both B-spline objects are close up to the given tolerances.
|
|
const utils::TensorArray< parDim_ > & | knots () const noexcept |
| Returns a constant reference to the array of knot vectors.
|
|
utils::TensorArray< parDim_ > & | knots () noexcept |
| Returns a non-constant reference to the array of knot vectors.
|
|
const torch::Tensor & | knots (short_t i) const noexcept |
| Returns a constant reference to the knot vector in the \(i\)-th dimension.
|
|
torch::Tensor & | knots (short_t i) noexcept |
| Returns a non-constant reference to the knot vector in the \(i\)-th dimension.
|
|
nlohmann::json | knots_to_json () const |
| Returns the B-spline object's knots as JSON object.
|
|
torch::Layout | layout () const noexcept override |
| Returns the layout property.
|
|
void | load (const std::string &filename, const std::string &key="bspline") |
| Loads the B-spline from file.
|
|
const std::array< int64_t, parDim_ > & | ncoeffs () const noexcept |
| Returns a constant reference to the array of coefficient vector dimensions.
|
|
int64_t | ncoeffs (short_t i) const noexcept |
| Returns the total number of coefficients in the \(i\)-th direction.
|
|
int64_t | ncumcoeffs () const noexcept |
| Returns the total number of coefficients.
|
|
const std::array< int64_t, parDim_ > & | nknots () const noexcept |
| Returns a constant reference to the array of knot vector dimensions.
|
|
int64_t | nknots (short_t i) const noexcept |
| Returns the dimension of the knot vector in the \(i\)-th dimension.
|
|
bool | operator!= (const UniformBSplineCore< other_t, GeoDim_, Degrees_... > &other) const |
| Returns true if both B-spline objects are different.
|
|
bool | operator== (const UniformBSplineCore< other_t, GeoDim_, Degrees_... > &other) const |
| Returns true if both B-spline objects are the same.
|
|
const Options< real_t > & | options () const noexcept |
| Returns a constant reference to the B-spline object's options.
|
|
bool | pinned_memory () const noexcept override |
| Returns the pinned_memory property.
|
|
torch::serialize::InputArchive & | read (torch::serialize::InputArchive &archive, const std::string &key="bspline") |
| Reads the B-spline from a torch::serialize::InputArchive object.
|
|
bool | requires_grad () const noexcept override |
| Returns the requires_grad property.
|
|
void | save (const std::string &filename, const std::string &key="bspline") const |
| Saves the B-spline to file.
|
|
UniformBSplineCore & | set_requires_grad (bool requires_grad) noexcept override |
| Sets the B-spline object's requires_grad property.
|
|
auto | to_gismo () const |
| Converts the B-spline object into a gsBSpline object of the parametric dimension is one and a gsTensorBSpline object otherwise.
|
|
BSpline & | to_gismo (BSpline &bspline, bool, bool) const |
|
nlohmann::json | to_json () const override |
| Returns the B-spline object as JSON object.
|
|
pugi::xml_document | to_xml (int id=0, std::string label="", int index=-1) const |
| Returns the B-spline object as XML object.
|
|
pugi::xml_node & | to_xml (pugi::xml_node &root, int id=0, std::string label="", int index=-1) const |
| Returns the B-spline object as XML node.
|
|
UniformBSplineCore & | transform (const std::function< std::array< real_t, geoDim_ >(const std::array< real_t, parDim_ > &)> transformation) |
| Transforms the coefficients based on the given mapping.
|
|
UniformBSplineCore & | transform (const std::function< std::array< real_t, N >(const std::array< real_t, parDim_ > &)> transformation, std::array< short_t, N > dims) |
| Transforms the coefficients based on the given mapping.
|
|
UniformBSplineCore & | uniform_refine (int numRefine=1, int dim=-1) |
| Returns the B-spline object with uniformly refined knot and coefficient vectors.
|
|
torch::serialize::OutputArchive & | write (torch::serialize::OutputArchive &archive, const std::string &key="bspline") const |
| Writes the B-spline into a torch::serialize::OutputArchive object.
|
|
virtual void | pretty_print (std::ostream &os=Log(log::info)) const =0 |
| Returns a string representation of the object.
|
|
virtual void | pretty_print (std::ostream &os=Log(log::info)) const noexcept=0 |
| Returns a string representation.
|
|
auto | eval_basfunc_univariate (const torch::Tensor &xi, const torch::Tensor &knot_indices) const |
| Returns the vector of univariate B-spline basis functions (or their derivatives) evaluated in the point xi
|
|
void | update_coeffs (const utils::TensorArray< parDim_ > &knots, const utils::TensorArray< parDim_ > &knot_indices) |
| Updates the B-spline coefficients after knot insertion.
|
|
auto | update_coeffs_univariate (const torch::Tensor &knots, const torch::Tensor &knot_indices) const |
| Returns the knot insertion matrix.
|
|
static constexpr const std::array< short_t, parDim_ > | degrees_ |
| Array storing the degrees \(\left(p_d\right)_{d=1}^{d_\text{par}}\).
|
|
static constexpr const short_t | geoDim_ |
| Dimension of the geometric space \(\Omega\subset\mathbb{R}^{d_\text{geo}}\).
|
|
static constexpr const short_t | parDim_ |
| Dimension of the parametric space \(\hat\Omega=[0,1]^{d_\text{par}}\).
|
|
template<
typename real_t,
short_t GeoDim, short_t... Degrees>
class iganet::NonUniformNurbsCore< real_t, GeoDim, Degrees >
Tensor-product non-uniform rational B-spline with non-uniform knot vectors (core functionality)
This class extends the base class NonUniformBSplineCore to non-uniform B-splines. Like its base class it only implements the core functionality of non-uniform B-splines