![]() |
IgANet
IGAnets - Isogeometric Analysis Networks
|
Multi-patch container class. More...
#include </home/runner/work/iganet/iganet/include/iganet/splines/multipatch.hpp>
Public Types | |
| using | interface_type = PatchInterface< Patch > |
| Interface type. | |
Public Member Functions | |
| MultiPatch ()=default | |
| Default constructor. | |
| MultiPatch (const MultiPatch &other) | |
| Copy constructor. | |
| MultiPatch (MultiPatch &&other) noexcept | |
| Move constructor. | |
| std::size_t | addInterface (interface_type patchInterface) |
| Adds an interface object. | |
| std::size_t | addInterface (std::shared_ptr< Patch > firstPatch, enum side firstSide, std::shared_ptr< Patch > secondPatch, enum side secondSide) |
| Adds an interface between two patches. | |
| std::size_t | addInterface (std::size_t firstPatch, enum side firstSide, std::size_t secondPatch, enum side secondSide) |
| Adds an interface between two patches identified by index. | |
| auto | begin () |
| Returns an iterator to the patches. | |
| void | clear () |
| Removes all patches. | |
| auto | end () |
| Returns an iterator to the end of the patches. | |
| template<typename P = Patch> requires requires { typename P::value_type; } | |
| MultiPatch & | from_json (const nlohmann::json &json, Options< typename P::value_type > options=Options< typename P::value_type >{}) |
| Updates the multi-patch object from a JSON object. | |
| template<typename P = Patch> requires requires { typename P::value_type; } | |
| MultiPatch & | from_xml (const pugi::xml_document &doc, int id=0, const std::string &label="", int index=-1, Options< typename P::value_type > options=Options< typename P::value_type >{}) |
| Updates the multi-patch object from an XML document. | |
| template<typename P = Patch> requires requires { typename P::value_type; } | |
| MultiPatch & | from_xml (const pugi::xml_node &root, int id=0, const std::string &label="", int index=-1, Options< typename P::value_type > options=Options< typename P::value_type >{}) |
| Updates the multi-patch object from an XML node. | |
| interface_type & | interface (std::size_t index) |
| Returns a non-constant reference to a single interface. | |
| const interface_type & | interface (std::size_t index) const |
| Returns a constant reference to a single interface. | |
| template<typename P = Patch> requires requires { typename P::value_type; } | |
| bool | isclose (const MultiPatch &other, typename P::value_type rtol=typename P::value_type{1e-5}, typename P::value_type atol=typename P::value_type{1e-8}) const |
| Returns true if patches and topology are close up to tolerances. | |
| template<typename P = Patch> requires requires { typename P::value_type; } | |
| void | load (const std::string &filename, const std::string &key="multipatch", Options< typename P::value_type > options=Options< typename P::value_type >{}) |
| Loads the multi-patch object from a Torch archive file. | |
| std::size_t | nboundaries () const |
| Returns the number of outer boundaries. | |
| std::size_t | ninterfaces () const |
| Returns the number of interfaces. | |
| std::size_t | npatches () const |
| Returns the number of patches. | |
| bool | operator!= (const MultiPatch &other) const |
| Returns true if patches or topology differ. | |
| bool | operator== (const MultiPatch &other) const |
| Returns true if patches and topology are exactly equal. | |
| Patch & | patch (std::size_t index) |
| Returns a non-constant reference to a single patch. | |
| const Patch & | patch (std::size_t index) const |
| Returns a constant reference to a single patch. | |
| void | pretty_print (std::ostream &os) const noexcept |
| Prints a human-readable representation of the multi-patch object. | |
| auto | rbegin () |
| Returns a reverse iterator to the patches. | |
| template<typename P = Patch> requires requires { typename P::value_type; } | |
| torch::serialize::InputArchive & | read (torch::serialize::InputArchive &archive, const std::string &key="multipatch", Options< typename P::value_type > options=Options< typename P::value_type >{}) |
| Reads the multi-patch object from a Torch input archive. | |
| void | removeInterface (std::size_t index) |
| Removes a single interface. | |
| auto | rend () |
| Returns a reverse iterator to the end of the patches. | |
| void | save (const std::string &filename, const std::string &key="multipatch") const |
| Saves the multi-patch object to a Torch archive file. | |
| nlohmann::json | to_json () const |
| Returns the multi-patch object as a JSON object. | |
| pugi::xml_document | to_xml (int id=0, const std::string &label="", int index=-1) const |
| Returns the multi-patch object as an XML document. | |
| pugi::xml_node & | to_xml (pugi::xml_node &root, int id=0, const std::string &label="", int index=-1) const |
| Appends the multi-patch object to an XML node. | |
| torch::serialize::OutputArchive & | write (torch::serialize::OutputArchive &archive, const std::string &key="multipatch") const |
| Writes the multi-patch object into a Torch output archive. | |
Static Private Member Functions | |
| template<typename real_t > | |
| static bool | jsonIsClose (const nlohmann::json &first, const nlohmann::json &second, real_t rtol, real_t atol) |
Private Attributes | |
| std::vector< interface_type > | interfaces_ |
| Vector of patch-interface objects. | |
| std::vector< std::shared_ptr< Patch > > | patches_ |
| Vector of single-patch objects. | |
Multi-patch container class.
This class implements a container for a set of patches and their topology, that is, the interface connections and outer boundary faces.
| using iganet::MultiPatch< Patch >::interface_type = PatchInterface<Patch> |
Interface type.
|
default |
Default constructor.
|
inline |
Copy constructor.
| other | Second input value. |
|
inlinenoexcept |
Move constructor.
| other | Second input value. |
|
inline |
Adds an interface object.
| patchInterface | Value of patchInterface. |
|
inline |
Adds an interface between two patches.
| firstPatch | Value of firstPatch. |
| firstSide | Value of firstSide. |
| secondPatch | Value of secondPatch. |
| secondSide | Value of secondSide. |
|
inline |
Adds an interface between two patches identified by index.
| firstPatch | Value of firstPatch. |
| firstSide | Value of firstSide. |
| secondPatch | Value of secondPatch. |
| secondSide | Value of secondSide. |
|
inline |
Adds a single patch.
| patch | Patch to process. |
|
inline |
Provides the addPatch operation.
| patch | Patch to process. |
|
inline |
Returns an iterator to the patches.
|
inline |
Returns a const-iterator to the patches.
|
inlinenoexcept |
Provides the cbegin operation.
|
inlinenoexcept |
Provides the cend operation.
|
inline |
Removes all patches.
|
inlinenoexcept |
Provides the crbegin operation.
|
inlinenoexcept |
Provides the crend operation.
|
inline |
Returns an iterator to the end of the patches.
|
inline |
Returns a const-iterator to the end of the patches.
|
inline |
Returns the index of a given patch interface.
| patchInterface | Value of patchInterface. |
|
inline |
Provides the findInterfaceIndex operation.
| patchInterface | Value of patchInterface. |
|
inline |
Returns the index of a given single patch.
| patch | Patch to process. |
|
inline |
Provides the findPatchIndex operation.
| patch | Patch to process. |
|
inline |
Updates the multi-patch object from a JSON object.
| P | Template parameter P. |
| json | JSON value to process. |
| options | Configuration options. |
|
inline |
Updates the multi-patch object from an XML document.
| P | Template parameter P. |
| doc | Value of doc. |
| id | Object identifier. |
| label | Object label. |
| index | Object index. |
| options | Configuration options. |
|
inline |
Updates the multi-patch object from an XML node.
| P | Template parameter P. |
| root | Root XML node. |
| id | Object identifier. |
| label | Object label. |
| index | Object index. |
| options | Configuration options. |
|
inline |
Returns a non-constant reference to a single interface.
| index | Object index. |
|
inline |
Returns a constant reference to a single interface.
| index | Object index. |
|
inline |
Returns the interfaces for range-based iteration.
|
inline |
Provides the interfaces operation.
|
inline |
Returns true if patches and topology are close up to tolerances.
| P | Template parameter P. |
| other | Second input value. |
| rtol | Value of rtol. |
| atol | Value of atol. |
|
inlinestaticprivate |
|
inline |
Loads the multi-patch object from a Torch archive file.
| P | Template parameter P. |
| filename | Path of the file to process. |
| key | Serialization key. |
| options | Configuration options. |
|
inline |
Returns the number of outer boundaries.
|
inline |
Returns the number of interfaces.
|
inline |
Returns the number of patches.
|
inline |
Returns true if patches or topology differ.
| other | Second input value. |
|
inline |
Returns true if patches and topology are exactly equal.
| other | Second input value. |
|
inline |
Returns a non-constant reference to a single patch.
| index | Object index. |
|
inline |
Returns a constant reference to a single patch.
| index | Object index. |
|
inline |
Returns a reference to the vector of patches.
|
inline |
Provides the patches operation.
|
inlinenoexcept |
Prints a human-readable representation of the multi-patch object.
| os | Output stream. |
|
inline |
Returns a reverse iterator to the patches.
|
inline |
Returns a reverse const-iterator to the patches.
|
inline |
Reads the multi-patch object from a Torch input archive.
| P | Template parameter P. |
| archive | Serialization archive. |
| key | Serialization key. |
| options | Configuration options. |
|
inline |
Removes a single interface.
| index | Object index. |
|
inline |
Returns a reverse iterator to the end of the patches.
|
inline |
Returns a reverse const-iterator to the end of the patches.
|
inline |
Saves the multi-patch object to a Torch archive file.
| filename | Path of the file to process. |
| key | Serialization key. |
|
inline |
Returns the multi-patch object as a JSON object.
|
inline |
Returns the multi-patch object as an XML document.
| id | Object identifier. |
| label | Object label. |
| index | Object index. |
|
inline |
Appends the multi-patch object to an XML node.
| root | Root XML node. |
| id | Object identifier. |
| label | Object label. |
| index | Object index. |
|
inline |
Writes the multi-patch object into a Torch output archive.
| archive | Serialization archive. |
| key | Serialization key. |
|
private |
Vector of patch-interface objects.
|
private |
Vector of single-patch objects.