![]() |
IgANet
IGAnets - Isogeometric Analysis Networks
|
Function space. More...
#include </home/runner/work/iganet/iganet/include/splines/functionspace.hpp>
Public Types | |
| using | boundary_eval_type = Boundary::eval_type |
| Boundary evaluation type. | |
| using | boundary_type = Boundary |
| Boundary type. | |
| using | eval_type = utils::TensorArray< Spline::parDim()> |
| Spline evaluation type. | |
| using | spline_type = Spline |
| Spline type. | |
| using | value_type = Spline::value_type |
| Value type. | |
Public Member Functions | |
| FunctionSpace ()=default | |
| Default constructor. | |
| FunctionSpace (const FunctionSpace &)=default | |
| Copy constructor. | |
| FunctionSpace (FunctionSpace &&)=default | |
| Move constructor. | |
| virtual torch::Tensor | as_tensor () const noexcept |
| Returns a single-tensor representation of the function space object. | |
| virtual int64_t | as_tensor_size () const noexcept |
| Returns the size of the single-tensor representation of the function space object. | |
| constexpr const auto & | boundaries () const noexcept |
| Returns a constant reference to the tuple of boundary object. | |
| constexpr auto & | boundaries () noexcept |
| Returns a non-constant reference to the tuple of boundary object. | |
| template<std::size_t index = 0> | |
| constexpr const boundary_type & | boundary () const noexcept |
| Returns a constant reference to the index-th boundary object. | |
| template<std::size_t index = 0> | |
| constexpr boundary_type & | boundary () noexcept |
| Returns a non-constant reference to the index-th boundary object. | |
| virtual torch::Tensor | boundary_as_tensor () const noexcept |
| Returns a single-tensor representation of the boundary. | |
| virtual int64_t | boundary_as_tensor_size () const noexcept |
| Returns the size of the single-tensor representation of the boundary. | |
| virtual FunctionSpace & | boundary_from_full_tensor (const torch::Tensor &coeffs) noexcept |
| Sets the boundary from a single-tensor representation. | |
| virtual FunctionSpace & | boundary_from_tensor (const torch::Tensor &coeffs) noexcept |
| Sets the boundary from a single-tensor representation of the boundary only. | |
| constexpr FunctionSpace | clone () const noexcept |
| Returns a clone of the function space. | |
| template<std::size_t... index> | |
| constexpr auto | clone () const noexcept |
| Returns a subset of the tuple of function spaces. | |
| template<functionspace comp = functionspace::interior, deriv deriv = deriv::func, bool memory_optimized = false, typename Arg , typename... Args> | |
| auto | eval (const Arg &arg, const Args &...args) const |
Returns the values of the spline object in the points xi | |
| template<functionspace comp = functionspace::interior, deriv deriv = deriv::func, bool memory_optimized = false, typename... Args> | |
| auto | eval_basfunc (const Args &...args) const |
Returns the values of the spline objects' basis functions in the points xi | |
| template<functionspace comp = functionspace::interior, typename... Args> | |
| auto | eval_from_precomputed (const Args &...args) const |
| Returns the value of the spline object from precomputed basis function. | |
| template<functionspace comp = functionspace::interior, bool memory_optimized = false, typename Knot_Indices > | |
| auto | find_coeff_indices (const Knot_Indices &knot_indices) const |
Returns the indices of the spline objects' coefficients corresponding to the knot indices indices | |
| template<functionspace comp = functionspace::interior, typename Xi > | |
| auto | find_knot_indices (const Xi &xi) const |
Returns the knot indicies of knot spans containing xi | |
| FunctionSpace & | from_tensor (const torch::Tensor &coeffs) noexcept |
| Sets the function space object from a single-tensor representation. | |
| FunctionSpace & | from_xml (const pugi::xml_document &doc, int id=0, const std::string &label="") |
| Updates the function space object from XML object. | |
| FunctionSpace & | from_xml (const pugi::xml_node &root, int id=0, std::string label="") |
| Updates the function space object from XML node. | |
| template<typename SplinesOther , typename BoundariesOther > | |
| bool | operator== (const FunctionSpace< SplinesOther, BoundariesOther > &other) const |
| Returns true if both function space objects are the same. | |
| void | pretty_print (std::ostream &os) const noexcept override |
| Returns a string representation of the function space object. | |
| torch::serialize::InputArchive & | read (torch::serialize::InputArchive &archive, const std::string &key="functionspace") |
| Loads the function space object from a torch::serialize::InputArchive object. | |
| auto | rotate (std::array< value_type, 3 > angle) |
| Rotates the function space object by three angles in 3d. | |
| auto | rotate (value_type angle) |
| Rotates the function space object by an angle in 2d. | |
| template<std::size_t N> | |
| auto | scale (std::array< value_type, N > v) |
| Scales the function space object by a vector. | |
| auto | scale (value_type s, int dim=-1) |
| Scales the function space object by a scalar. | |
| template<std::size_t index = 0> | |
| constexpr const spline_type & | space () const noexcept |
| Returns a constant reference to the index-th function space. | |
| template<std::size_t index = 0> | |
| constexpr spline_type & | space () noexcept |
| Returns a non-constant reference to the index-th function space. | |
| constexpr const auto & | spaces () const noexcept |
| Returns a constant reference to the tuple of function spaces. | |
| constexpr auto & | spaces () noexcept |
| Returns a non-constant reference to the tuple of function spaces. | |
| virtual torch::Tensor | spaces_as_tensor () const noexcept |
| Returns a single-tensor representation of the space. | |
| virtual int64_t | spaces_as_tensor_size () const noexcept |
| Returns the size of the single-tensor representation of the space. | |
| virtual FunctionSpace & | spaces_from_tensor (const torch::Tensor &coeffs) noexcept |
| Sets the space from a single-tensor representation. | |
| template<typename real_t > | |
| auto | to () const |
| Returns a copy of the function space object with real_t type. | |
| template<typename real_t > | |
| auto | to (Options< real_t > options) const |
| Returns a copy of the function space object with settings from options. | |
| auto | to (torch::Device device) const |
| Returns a copy of the function space object with settings from device. | |
| nlohmann::json | to_json () const override |
| Serialization to JSON. | |
| pugi::xml_document | to_xml (int id=0, const std::string &label="") const |
| Returns the function space object as XML object. | |
| pugi::xml_node & | to_xml (pugi::xml_node &root, int id=0, std::string label="") const |
| Returns the function space object as XML node. | |
| FunctionSpace & | transform (const std::function< std::array< typename Spline::value_type, Spline::geoDim()>(const std::array< typename Spline::value_type, Spline::parDim()> &)> mapping) |
| Transforms the coefficients based on the given mapping. | |
| template<std::size_t N> | |
| auto | translate (std::array< value_type, N > v) |
| Translates the function space object by a vector. | |
| auto & | uniform_refine (int numRefine=1, int dimRefine=-1) |
| Returns the spline objects with uniformly refined knot and coefficient vectors. | |
| torch::serialize::OutputArchive & | write (torch::serialize::OutputArchive &archive, const std::string &key="functionspace") const |
| Writes the function space object into a torch::serialize::OutputArchive object. | |
Public Member Functions inherited from iganet::utils::Serializable | |
| virtual | ~Serializable ()=default |
| Destructor. | |
Static Public Member Functions | |
| template<std::size_t index = 0> | |
| static constexpr short_t | degree (short_t i) noexcept |
| Returns a constant reference to the degree in the \(i\)-th dimension of the index-th space. | |
| template<std::size_t index = 0> | |
| static constexpr const auto & | degrees () noexcept |
| Returns a constant reference to the array of degrees of the index-th space. | |
| template<std::size_t index = 0> | |
| static constexpr short_t | geoDim () noexcept |
| Returns the geometric dimensions of the index-th space. | |
| static constexpr std::size_t | nboundaries () noexcept |
| Returns the number of boundaries. | |
| static constexpr std::size_t | nspaces () noexcept |
| Returns the number of function spaces. | |
| template<std::size_t index = 0> | |
| static constexpr short_t | parDim () noexcept |
| Returns the parametric dimensions of the index-th space. | |
Protected Attributes | |
| boundary_type | boundary_ |
| Boundary. | |
| spline_type | spline_ |
| Spline. | |
Private Member Functions | |
| template<functionspace comp = functionspace::interior, bool memory_optimized = false, std::size_t... Is, typename Knot_Indices > | |
| auto | find_coeff_indices_ (std::index_sequence< Is... >, const Knot_Indices &knot_indices) const |
Returns the indices of the spline objects' coefficients corresponding to the knot indices indices | |
| template<functionspace comp = functionspace::interior, std::size_t... Is, typename Xi > | |
| auto | find_knot_indices_ (std::index_sequence< Is... >, const Xi &xi) const |
Returns the knot indicies of knot spans containing xi | |
Private Member Functions inherited from iganet::utils::FullQualifiedName | |
| virtual | ~FullQualifiedName ()=default |
| virtual const std::string & | name () const noexcept |
| Returns the full qualified name of the object. | |
Additional Inherited Members | |
Private Attributes inherited from iganet::utils::FullQualifiedName | |
| at::optional< std::string > | name_ |
| String storing the full qualified name of the object. | |
Function space.
| using iganet::detail::FunctionSpace< Spline, Boundary >::boundary_eval_type = Boundary::eval_type |
Boundary evaluation type.
| using iganet::detail::FunctionSpace< Spline, Boundary >::boundary_type = Boundary |
Boundary type.
| using iganet::detail::FunctionSpace< Spline, Boundary >::eval_type = utils::TensorArray<Spline::parDim()> |
Spline evaluation type.
| using iganet::detail::FunctionSpace< Spline, Boundary >::spline_type = Spline |
Spline type.
| using iganet::detail::FunctionSpace< Spline, Boundary >::value_type = Spline::value_type |
Value type.
|
default |
Default constructor.
|
default |
Copy constructor.
|
default |
Move constructor.
|
inlineexplicit |
Constructor.
|
inlineexplicit |
Constructor.
|
inlineexplicit |
Constructor.
|
inlineexplicit |
Constructor.
|
inlinevirtualnoexcept |
Returns a single-tensor representation of the function space object.
|
inlinevirtualnoexcept |
Returns the size of the single-tensor representation of the function space object.
|
inlineconstexprnoexcept |
Returns a constant reference to the tuple of boundary object.
|
inlineconstexprnoexcept |
Returns a non-constant reference to the tuple of boundary object.
|
inlineconstexprnoexcept |
Returns a constant reference to the index-th boundary object.
|
inlineconstexprnoexcept |
Returns a non-constant reference to the index-th boundary object.
|
inlinevirtualnoexcept |
Returns a single-tensor representation of the boundary.
|
inlinevirtualnoexcept |
Returns the size of the single-tensor representation of the boundary.
|
inlinevirtualnoexcept |
Sets the boundary from a single-tensor representation.
|
inlinevirtualnoexcept |
Sets the boundary from a single-tensor representation of the boundary only.
|
inlineconstexprnoexcept |
Returns a clone of the function space.
|
inlineconstexprnoexcept |
Returns a subset of the tuple of function spaces.
|
inlinestaticconstexprnoexcept |
Returns a constant reference to the degree in the \(i\)-th dimension of the index-th space.
|
inlinestaticconstexprnoexcept |
Returns a constant reference to the array of degrees of the index-th space.
|
inline |
Returns the values of the spline object in the points xi
|
inlineprivate |
Returns the values of the spline object in the points xi
|
inlineprivate |
Returns the values of the spline object in the points xi
|
inlineprivate |
Returns the values of the spline object in the points xi
|
inline |
Returns the values of the spline objects' basis functions in the points xi
|
inline |
Returns the value of the spline object from precomputed basis function.
|
inline |
Returns the indices of the spline objects' coefficients corresponding to the knot indices indices
|
inlineprivate |
Returns the indices of the spline objects' coefficients corresponding to the knot indices indices
|
inline |
Returns the knot indicies of knot spans containing xi
|
inlineprivate |
Returns the knot indicies of knot spans containing xi
|
inlinenoexcept |
Sets the function space object from a single-tensor representation.
|
inline |
Updates the function space object from XML object.
|
inline |
Updates the function space object from XML node.
|
inlinestaticconstexprnoexcept |
Returns the geometric dimensions of the index-th space.
|
inlinestaticconstexprnoexcept |
Returns the number of boundaries.
|
inlinestaticconstexprnoexcept |
Returns the number of function spaces.
|
inline |
Returns true if both function space objects are the same.
|
inlinestaticconstexprnoexcept |
Returns the parametric dimensions of the index-th space.
|
inlineoverridevirtualnoexcept |
Returns a string representation of the function space object.
Implements iganet::utils::Serializable.
|
inline |
Loads the function space object from a torch::serialize::InputArchive object.
|
inline |
Rotates the function space object by three angles in 3d.
|
inline |
Rotates the function space object by an angle in 2d.
|
inline |
Scales the function space object by a vector.
|
inline |
Scales the function space object by a scalar.
|
inlineconstexprnoexcept |
Returns a constant reference to the index-th function space.
|
inlineconstexprnoexcept |
Returns a non-constant reference to the index-th function space.
|
inlineconstexprnoexcept |
Returns a constant reference to the tuple of function spaces.
|
inlineconstexprnoexcept |
Returns a non-constant reference to the tuple of function spaces.
|
inlinevirtualnoexcept |
Returns a single-tensor representation of the space.
|
inlinevirtualnoexcept |
Returns the size of the single-tensor representation of the space.
|
inlinevirtualnoexcept |
Sets the space from a single-tensor representation.
|
inline |
Returns a copy of the function space object with real_t type.
|
inline |
Returns a copy of the function space object with settings from options.
|
inline |
Returns a copy of the function space object with settings from device.
|
inlineoverridevirtual |
Serialization to JSON.
Implements iganet::utils::Serializable.
|
inline |
Returns the function space object as XML object.
|
inline |
Returns the function space object as XML node.
|
inline |
Transforms the coefficients based on the given mapping.
|
inline |
Translates the function space object by a vector.
|
inline |
Returns the spline objects with uniformly refined knot and coefficient vectors.
|
inline |
Writes the function space object into a torch::serialize::OutputArchive object.
|
protected |
Boundary.
|
protected |
Spline.