![]() |
IgANet
IgANets - Isogeometric Analysis Networks
|
Function space. More...
#include </home/runner/work/iganet/iganet/include/functionspace.hpp>
Public Types | |
using | boundary_eval_type = typename 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 = typename 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. | |
template<short_t s = 0> | |
constexpr const boundary_type & | boundary () const noexcept |
Returns a constant reference to the \(s\)-th boundary object. | |
template<short_t s = 0> | |
constexpr boundary_type & | boundary () noexcept |
Returns a non-constant reference to the \(s\)-th boundary object 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<short_t... s> | |
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, 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. | |
virtual void | pretty_print (std::ostream &os=Log(log::info)) 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<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<short_t s = 0> | |
constexpr const spline_type & | space () const noexcept |
Returns a constant reference to the \(s\)-th function space. | |
template<short_t s = 0> | |
constexpr spline_type & | space () noexcept |
Returns a non-constant reference to the \(s\)-th function space. | |
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, 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()> &)> transformation) |
Transforms the coefficients based on the given mapping. | |
template<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. | |
Static Public Member Functions | |
static constexpr short_t | nboundaries () noexcept |
Returns the number of boundaries. | |
static constexpr short_t | nspaces () noexcept |
Returns the number of function spaces. | |
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 | |
![]() | |
virtual const std::string & | name () const noexcept |
Returns the full qualified name of the object. | |
Additional Inherited Members | |
![]() | |
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 = typename 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 = typename Spline::value_type |
Value type.
|
default |
Default constructor.
|
default |
Copy constructor.
|
default |
Move constructor.
|
inline |
Constructor.
|
inline |
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 \(s\)-th boundary object.
|
inlineconstexprnoexcept |
Returns a non-constant reference to the \(s\)-th boundary object 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.
|
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 number of boundaries.
|
inlinestaticconstexprnoexcept |
Returns the number of function spaces.
|
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 \(s\)-th function space.
|
inlineconstexprnoexcept |
Returns a non-constant reference to the \(s\)-th function space.
|
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.