IgANet
IgANets - Isogeometric Analysis Networks
Loading...
Searching...
No Matches
iganet::webapp::BSplineModel< Spline > Class Template Reference

B-spline model. More...

#include </home/runner/work/iganet/iganet/webapps/models/iganet/BSplineModel.hpp>

Inheritance diagram for iganet::webapp::BSplineModel< Spline >:
iganet::Model< Spline::value_type > iganet::ModelEval iganet::ModelReparameterize iganet::ModelRefine iganet::ModelSerialize iganet::ModelXML

Public Member Functions

 BSplineModel ()
 Default constructor.
 
 BSplineModel (const std::array< int64_t, Spline::parDim()> ncoeffs, enum iganet::init init=iganet::init::zeros)
 Constructor for equidistant knot vectors.
 
 ~BSplineModel ()
 Destructor.
 
nlohmann::json eval (const std::string &patch, const std::string &component, const nlohmann::json &json) const override
 Evaluates the model.
 
nlohmann::json exportXML (const std::string &patch, const std::string &component, int id=0) override
 Exports the model to XML (as JSON object)
 
pugi::xml_node & exportXML (const std::string &patch, const std::string &component, pugi::xml_node &xml, int id=0) override
 Exports the model to XML (as XML object)
 
std::string getDescription () const override
 Returns the model's description.
 
nlohmann::json getInputs () const override
 Returns the model's inputs.
 
std::string getName () const override
 Returns the model's name.
 
nlohmann::json getOptions () const override
 Returns the model's options.
 
nlohmann::json getOutputs () const override
 Returns the model's outputs.
 
nlohmann::json getParameters () const override
 Returns the model's parameters.
 
void importXML (const std::string &patch, const std::string &component, const nlohmann::json &json, int id=0) override
 Imports the model from XML (as JSON object)
 
void importXML (const std::string &patch, const std::string &component, const pugi::xml_node &xml, int id=0) override
 Imports the model from XML (as XML object)
 
void load (const nlohmann::json &json) override
 Loads model from LibTorch file.
 
void refine (const nlohmann::json &json=NULL) override
 Refines the model.
 
void reparameterize (const std::string &patch, const nlohmann::json &json=NULL) override
 Reparameterize the model.
 
nlohmann::json save () const override
 Saves model to LibTorch file.
 
nlohmann::json to_json (const std::string &patch, const std::string &component, const std::string &attribute) const override
 Serializes the model to JSON.
 
nlohmann::json updateAttribute (const std::string &patch, const std::string &component, const std::string &attribute, const nlohmann::json &json) override
 Updates the attributes of the model.
 
- Public Member Functions inherited from iganet::Model< Spline::value_type >
 Model ()
 Constructor.
 
virtual ~Model ()
 Destructor.
 
virtual nlohmann::json getCapabilities () const
 Returns the model's capabilities.
 
virtual nlohmann::json getModel () const
 Returns the model's JSON serialization.
 
- Public Member Functions inherited from iganet::ModelEval
std::vector< std::string > getCapabilities () const
 
- Public Member Functions inherited from iganet::ModelReparameterize
std::vector< std::string > getCapabilities () const
 
- Public Member Functions inherited from iganet::ModelRefine
std::vector< std::string > getCapabilities () const
 
- Public Member Functions inherited from iganet::ModelSerialize
std::vector< std::string > getCapabilities () const
 
- Public Member Functions inherited from iganet::ModelXML
std::vector< std::string > getCapabilities () const
 

Private Types

using Base = Model< typename Spline::value_type >
 Base model.
 

Private Attributes

Spline solution_
 "fake" solution vector
 

Detailed Description

template<class Spline>
class iganet::webapp::BSplineModel< Spline >

B-spline model.

Member Typedef Documentation

◆ Base

template<class Spline >
using iganet::webapp::BSplineModel< Spline >::Base = Model<typename Spline::value_type>
private

Base model.

Constructor & Destructor Documentation

◆ BSplineModel() [1/2]

template<class Spline >
iganet::webapp::BSplineModel< Spline >::BSplineModel ( )
inline

Default constructor.

◆ BSplineModel() [2/2]

template<class Spline >
iganet::webapp::BSplineModel< Spline >::BSplineModel ( const std::array< int64_t, Spline::parDim()>  ncoeffs,
enum iganet::init  init = iganet::init::zeros 
)
inline

Constructor for equidistant knot vectors.

◆ ~BSplineModel()

template<class Spline >
iganet::webapp::BSplineModel< Spline >::~BSplineModel ( )
inline

Destructor.

Member Function Documentation

◆ eval()

template<class Spline >
nlohmann::json iganet::webapp::BSplineModel< Spline >::eval ( const std::string &  patch,
const std::string &  component,
const nlohmann::json &  json 
) const
inlineoverridevirtual

Evaluates the model.

Implements iganet::ModelEval.

◆ exportXML() [1/2]

template<class Spline >
nlohmann::json iganet::webapp::BSplineModel< Spline >::exportXML ( const std::string &  patch,
const std::string &  component,
int  id = 0 
)
inlineoverridevirtual

Exports the model to XML (as JSON object)

Implements iganet::ModelXML.

◆ exportXML() [2/2]

template<class Spline >
pugi::xml_node & iganet::webapp::BSplineModel< Spline >::exportXML ( const std::string &  patch,
const std::string &  component,
pugi::xml_node &  xml,
int  id = 0 
)
inlineoverridevirtual

Exports the model to XML (as XML object)

Implements iganet::ModelXML.

◆ getDescription()

template<class Spline >
std::string iganet::webapp::BSplineModel< Spline >::getDescription ( ) const
inlineoverridevirtual

Returns the model's description.

Implements iganet::Model< Spline::value_type >.

◆ getInputs()

template<class Spline >
nlohmann::json iganet::webapp::BSplineModel< Spline >::getInputs ( ) const
inlineoverridevirtual

Returns the model's inputs.

Implements iganet::Model< Spline::value_type >.

◆ getName()

template<class Spline >
std::string iganet::webapp::BSplineModel< Spline >::getName ( ) const
inlineoverridevirtual

Returns the model's name.

Implements iganet::Model< Spline::value_type >.

◆ getOptions()

template<class Spline >
nlohmann::json iganet::webapp::BSplineModel< Spline >::getOptions ( ) const
inlineoverridevirtual

Returns the model's options.

Implements iganet::Model< Spline::value_type >.

◆ getOutputs()

template<class Spline >
nlohmann::json iganet::webapp::BSplineModel< Spline >::getOutputs ( ) const
inlineoverridevirtual

Returns the model's outputs.

Implements iganet::Model< Spline::value_type >.

◆ getParameters()

template<class Spline >
nlohmann::json iganet::webapp::BSplineModel< Spline >::getParameters ( ) const
inlineoverridevirtual

Returns the model's parameters.

Implements iganet::Model< Spline::value_type >.

◆ importXML() [1/2]

template<class Spline >
void iganet::webapp::BSplineModel< Spline >::importXML ( const std::string &  patch,
const std::string &  component,
const nlohmann::json &  json,
int  id = 0 
)
inlineoverridevirtual

Imports the model from XML (as JSON object)

Implements iganet::ModelXML.

◆ importXML() [2/2]

template<class Spline >
void iganet::webapp::BSplineModel< Spline >::importXML ( const std::string &  patch,
const std::string &  component,
const pugi::xml_node &  xml,
int  id = 0 
)
inlineoverridevirtual

Imports the model from XML (as XML object)

Implements iganet::ModelXML.

◆ load()

template<class Spline >
void iganet::webapp::BSplineModel< Spline >::load ( const nlohmann::json &  json)
inlineoverridevirtual

Loads model from LibTorch file.

Implements iganet::ModelSerialize.

◆ refine()

template<class Spline >
void iganet::webapp::BSplineModel< Spline >::refine ( const nlohmann::json &  json = NULL)
inlineoverridevirtual

Refines the model.

Implements iganet::ModelRefine.

◆ reparameterize()

template<class Spline >
void iganet::webapp::BSplineModel< Spline >::reparameterize ( const std::string &  patch,
const nlohmann::json &  json = NULL 
)
inlineoverridevirtual

Reparameterize the model.

Implements iganet::ModelReparameterize.

◆ save()

template<class Spline >
nlohmann::json iganet::webapp::BSplineModel< Spline >::save ( ) const
inlineoverridevirtual

Saves model to LibTorch file.

Implements iganet::ModelSerialize.

◆ to_json()

template<class Spline >
nlohmann::json iganet::webapp::BSplineModel< Spline >::to_json ( const std::string &  patch,
const std::string &  component,
const std::string &  attribute 
) const
inlineoverridevirtual

Serializes the model to JSON.

Reimplemented from iganet::Model< Spline::value_type >.

◆ updateAttribute()

template<class Spline >
nlohmann::json iganet::webapp::BSplineModel< Spline >::updateAttribute ( const std::string &  patch,
const std::string &  component,
const std::string &  attribute,
const nlohmann::json &  json 
)
inlineoverridevirtual

Updates the attributes of the model.

Reimplemented from iganet::Model< Spline::value_type >.

Member Data Documentation

◆ solution_

template<class Spline >
Spline iganet::webapp::BSplineModel< Spline >::solution_
private

"fake" solution vector


The documentation for this class was generated from the following file: