![]() |
IgANet
IGAnets - Isogeometric Analysis Networks
|
Abstract patch function base class. More...
#include </home/runner/work/iganet/iganet/include/iganet/splines/patch.hpp>
Public Types | |
| using | value_type = real_t |
| Scalar type. | |
Public Member Functions | |
| virtual | ~BSplinePatch ()=default |
| Destructor. | |
| virtual torch::Tensor | as_tensor () const noexcept=0 |
Provides the as_tensor operation. | |
| virtual int64_t | as_tensor_size () const noexcept=0 |
| Returns the size of the single tensor representation of all coefficients. | |
| virtual torch::Device | device () const noexcept=0 |
Returns the device property. | |
| virtual int32_t | device_index () const noexcept=0 |
Returns the device_index property. | |
| virtual torch::Dtype | dtype () const noexcept=0 |
Returns the dtype property. | |
| virtual BSplinePatch & | from_json (const nlohmann::json &json)=0 |
| Updates the B-spline patch from a JSON object. | |
| virtual BSplinePatch & | from_tensor (const torch::Tensor &tensor) noexcept=0 |
| Sets all coefficients from a single tensor. | |
| virtual BSplinePatch & | from_xml (const pugi::xml_document &doc, int id=0, const std::string &label="", int index=-1)=0 |
| Updates the B-spline patch from an XML document. | |
| virtual BSplinePatch & | from_xml (const pugi::xml_node &root, int id=0, const std::string &label="", int index=-1)=0 |
| Updates the B-spline patch from an XML node. | |
| virtual bool | is_sparse () const noexcept=0 |
| Returns if the layout is sparse. | |
| virtual torch::Layout | layout () const noexcept=0 |
Returns the layout property. | |
| virtual bool | pinned_memory () const noexcept=0 |
Returns the pinned_memory property. | |
| virtual void | pretty_print (std::ostream &os=Log(log::info)) const noexcept=0 |
| Returns a string representation. | |
| virtual bool | requires_grad () const noexcept=0 |
Returns the requires_grad property. | |
| virtual BSplinePatch & | set_requires_grad (bool requires_grad) noexcept=0 |
Sets the B-spline object's requires_grad property. | |
| virtual nlohmann::json | to_json () const =0 |
| Returns the B-spline patch as a JSON object. | |
| virtual pugi::xml_document | to_xml (int id=0, const std::string &label="", int index=-1) const =0 |
| Returns the B-spline patch as an XML document. | |
| virtual pugi::xml_node & | to_xml (pugi::xml_node &root, int id=0, const std::string &label="", int index=-1) const =0 |
| Appends the B-spline patch to an XML node. | |
Static Public Member Functions | |
| static constexpr short_t | geoDim () noexcept |
| Dimension of the physical space. | |
| static constexpr short_t | parDim () noexcept |
| Dimension of the parametric space. | |
Abstract patch function base class.
| using iganet::BSplinePatch< real_t, GeoDim, ParDim >::value_type = real_t |
Scalar type.
|
virtualdefault |
Destructor.
|
pure virtualnoexcept |
Provides the as_tensor operation.
Implemented in iganet::UniformBSplineCore< real_t, GeoDim, Degrees >, iganet::UniformBSplineCore< real_t, GeoDim+1, Degrees... >, and iganet::UniformBSplineCore< real_t, GeoDim, Degrees... >.
|
pure virtualnoexcept |
Returns the size of the single tensor representation of all coefficients.
Implemented in iganet::UniformBSplineCore< real_t, GeoDim, Degrees >, iganet::UniformBSplineCore< real_t, GeoDim+1, Degrees... >, and iganet::UniformBSplineCore< real_t, GeoDim, Degrees... >.
|
pure virtualnoexcept |
Returns the device property.
Implemented in iganet::UniformBSplineCore< real_t, GeoDim, Degrees >, iganet::UniformBSplineCore< real_t, GeoDim+1, Degrees... >, and iganet::UniformBSplineCore< real_t, GeoDim, Degrees... >.
|
pure virtualnoexcept |
Returns the device_index property.
Implemented in iganet::UniformBSplineCore< real_t, GeoDim, Degrees >, iganet::UniformBSplineCore< real_t, GeoDim+1, Degrees... >, and iganet::UniformBSplineCore< real_t, GeoDim, Degrees... >.
|
pure virtualnoexcept |
Returns the dtype property.
Implemented in iganet::UniformBSplineCore< real_t, GeoDim, Degrees >, iganet::UniformBSplineCore< real_t, GeoDim+1, Degrees... >, and iganet::UniformBSplineCore< real_t, GeoDim, Degrees... >.
|
pure virtual |
Returns the value of the spline function from precomputed basis function.
| basfunc | Value of basfunc. |
| coeff_indices | Value of coeff_indices. |
| numeval | Value of numeval. |
| sizes | Value of sizes. |
Implemented in iganet::UniformBSplineCore< real_t, GeoDim, Degrees >, iganet::UniformBSplineCore< real_t, GeoDim+1, Degrees... >, and iganet::UniformBSplineCore< real_t, GeoDim, Degrees... >.
|
pure virtual |
Provides the eval_from_precomputed operation.
| basfunc | Value of basfunc. |
| coeff_indices | Value of coeff_indices. |
| numeval | Value of numeval. |
| sizes | Value of sizes. |
|
pure virtual |
Updates the B-spline patch from a JSON object.
| json | JSON value to process. |
Implemented in iganet::UniformBSplineCore< real_t, GeoDim, Degrees >, iganet::UniformBSplineCore< real_t, GeoDim+1, Degrees... >, and iganet::UniformBSplineCore< real_t, GeoDim, Degrees... >.
|
pure virtualnoexcept |
Sets all coefficients from a single tensor.
| tensor | Tensor to process. |
Implemented in iganet::UniformBSplineCore< real_t, GeoDim, Degrees >, iganet::UniformBSplineCore< real_t, GeoDim+1, Degrees... >, and iganet::UniformBSplineCore< real_t, GeoDim, Degrees... >.
|
pure virtual |
Updates the B-spline patch from an XML document.
| doc | Value of doc. |
| id | Object identifier. |
| label | Object label. |
| index | Object index. |
Implemented in iganet::UniformBSplineCore< real_t, GeoDim, Degrees >, iganet::UniformBSplineCore< real_t, GeoDim+1, Degrees... >, and iganet::UniformBSplineCore< real_t, GeoDim, Degrees... >.
|
pure virtual |
Updates the B-spline patch from an XML node.
| root | Root XML node. |
| id | Object identifier. |
| label | Object label. |
| index | Object index. |
Implemented in iganet::UniformBSplineCore< real_t, GeoDim, Degrees >, iganet::UniformBSplineCore< real_t, GeoDim+1, Degrees... >, and iganet::UniformBSplineCore< real_t, GeoDim, Degrees... >.
|
inlinestaticconstexprnoexcept |
Dimension of the physical space.
|
pure virtualnoexcept |
Returns if the layout is sparse.
Implemented in iganet::UniformBSplineCore< real_t, GeoDim, Degrees >, iganet::UniformBSplineCore< real_t, GeoDim+1, Degrees... >, and iganet::UniformBSplineCore< real_t, GeoDim, Degrees... >.
|
pure virtualnoexcept |
Returns the layout property.
Implemented in iganet::UniformBSplineCore< real_t, GeoDim, Degrees >, iganet::UniformBSplineCore< real_t, GeoDim+1, Degrees... >, and iganet::UniformBSplineCore< real_t, GeoDim, Degrees... >.
|
inlinestaticconstexprnoexcept |
Dimension of the parametric space.
|
pure virtualnoexcept |
Returns the pinned_memory property.
Implemented in iganet::UniformBSplineCore< real_t, GeoDim, Degrees >, iganet::UniformBSplineCore< real_t, GeoDim+1, Degrees... >, and iganet::UniformBSplineCore< real_t, GeoDim, Degrees... >.
|
pure virtualnoexcept |
Returns a string representation.
| os | Output stream. |
|
pure virtualnoexcept |
Returns the requires_grad property.
Implemented in iganet::UniformBSplineCore< real_t, GeoDim, Degrees >, iganet::UniformBSplineCore< real_t, GeoDim+1, Degrees... >, and iganet::UniformBSplineCore< real_t, GeoDim, Degrees... >.
|
pure virtualnoexcept |
Sets the B-spline object's requires_grad property.
| requires_grad | Value of requires_grad. |
Implemented in iganet::UniformBSplineCore< real_t, GeoDim, Degrees >, iganet::UniformBSplineCore< real_t, GeoDim+1, Degrees... >, and iganet::UniformBSplineCore< real_t, GeoDim, Degrees... >.
|
pure virtual |
Returns the B-spline patch as a JSON object.
Implemented in iganet::UniformBSplineCore< real_t, GeoDim, Degrees >, iganet::UniformBSplineCore< real_t, GeoDim+1, Degrees... >, and iganet::UniformBSplineCore< real_t, GeoDim, Degrees... >.
|
pure virtual |
Returns the B-spline patch as an XML document.
| id | Object identifier. |
| label | Object label. |
| index | Object index. |
Implemented in iganet::UniformBSplineCore< real_t, GeoDim, Degrees >, iganet::UniformBSplineCore< real_t, GeoDim+1, Degrees... >, and iganet::UniformBSplineCore< real_t, GeoDim, Degrees... >.
|
pure virtual |
Appends the B-spline patch to an XML node.
| root | Root XML node. |
| id | Object identifier. |
| label | Object label. |
| index | Object index. |
Implemented in iganet::UniformBSplineCore< real_t, GeoDim, Degrees >, iganet::UniformBSplineCore< real_t, GeoDim+1, Degrees... >, and iganet::UniformBSplineCore< real_t, GeoDim, Degrees... >.