PolyFEM
Loading...
Searching...
No Matches
polyfem::BSplineParametrization2D Class Reference

#include <BSplineParametrization.hpp>

Inheritance diagram for polyfem::BSplineParametrization2D:
[legend]
Collaboration diagram for polyfem::BSplineParametrization2D:
[legend]

Public Member Functions

 BSplineParametrization2D (const Eigen::MatrixXd &control_points, const Eigen::MatrixXd &knots, const Eigen::MatrixXd &V)
 
int vertex_size () override
 
void reparametrize (const Eigen::MatrixXd &control_points, Eigen::MatrixXd &newV) override
 
void get_parameters (const Eigen::MatrixXd &V, Eigen::MatrixXd &control_points, const bool mesh_changed) override
 
void derivative_wrt_params (const Eigen::VectorXd &grad_boundary, Eigen::VectorXd &grad_control_points) override
 
- Public Member Functions inherited from polyfem::BSplineParametrization
 BSplineParametrization (const Eigen::MatrixXd &V)
 
virtual ~BSplineParametrization ()=default
 

Static Public Member Functions

static void gradient (const Eigen::MatrixXd &point, const Eigen::MatrixXd &control_points, const double t_parameter, const double distance, Eigen::MatrixXd &grad)
 
static void eval (const Eigen::MatrixXd &control_points, const double t, Eigen::MatrixXd &val)
 
static void deriv (const Eigen::MatrixXd &control_points, const double t, Eigen::MatrixXd &val)
 

Private Attributes

std::vector< int > node_ids_
 
std::map< int, double > node_id_to_t_
 
const int dim
 
nanospline::BSpline< double, 2, 3 > curve
 

Additional Inherited Members

- Protected Attributes inherited from polyfem::BSplineParametrization
int num_vertices
 

Detailed Description

Definition at line 29 of file BSplineParametrization.hpp.

Constructor & Destructor Documentation

◆ BSplineParametrization2D()

polyfem::BSplineParametrization2D::BSplineParametrization2D ( const Eigen::MatrixXd &  control_points,
const Eigen::MatrixXd &  knots,
const Eigen::MatrixXd &  V 
)

Definition at line 12 of file BSplineParametrization.cpp.

References curve, dim, polyfem::log_and_throw_error(), polyfem::logger(), node_id_to_t_, node_ids_, and V.

Here is the call graph for this function:

Member Function Documentation

◆ deriv()

void polyfem::BSplineParametrization2D::deriv ( const Eigen::MatrixXd &  control_points,
const double  t,
Eigen::MatrixXd &  val 
)
static

Definition at line 129 of file BSplineParametrization.cpp.

References curve, and val.

◆ derivative_wrt_params()

void polyfem::BSplineParametrization2D::derivative_wrt_params ( const Eigen::VectorXd &  grad_boundary,
Eigen::VectorXd &  grad_control_points 
)
overridevirtual

Implements polyfem::BSplineParametrization.

Definition at line 93 of file BSplineParametrization.cpp.

References curve, dim, node_id_to_t_, and node_ids_.

◆ eval()

void polyfem::BSplineParametrization2D::eval ( const Eigen::MatrixXd &  control_points,
const double  t,
Eigen::MatrixXd &  val 
)
static

Definition at line 122 of file BSplineParametrization.cpp.

References curve, and val.

◆ get_parameters()

void polyfem::BSplineParametrization2D::get_parameters ( const Eigen::MatrixXd &  V,
Eigen::MatrixXd &  control_points,
const bool  mesh_changed 
)
overridevirtual

Implements polyfem::BSplineParametrization.

Definition at line 64 of file BSplineParametrization.cpp.

References curve, dim, node_id_to_t_, node_ids_, and V.

◆ gradient()

void polyfem::BSplineParametrization2D::gradient ( const Eigen::MatrixXd &  point,
const Eigen::MatrixXd &  control_points,
const double  t_parameter,
const double  distance,
Eigen::MatrixXd &  grad 
)
static

Definition at line 113 of file BSplineParametrization.cpp.

References curve, and val.

◆ reparametrize()

void polyfem::BSplineParametrization2D::reparametrize ( const Eigen::MatrixXd &  control_points,
Eigen::MatrixXd &  newV 
)
overridevirtual

Implements polyfem::BSplineParametrization.

Definition at line 52 of file BSplineParametrization.cpp.

References curve, dim, node_id_to_t_, and node_ids_.

◆ vertex_size()

int polyfem::BSplineParametrization2D::vertex_size ( )
inlineoverridevirtual

Implements polyfem::BSplineParametrization.

Definition at line 34 of file BSplineParametrization.hpp.

References node_id_to_t_.

Member Data Documentation

◆ curve

nanospline::BSpline<double, 2, 3> polyfem::BSplineParametrization2D::curve
private

◆ dim

const int polyfem::BSplineParametrization2D::dim
private

◆ node_id_to_t_

std::map<int, double> polyfem::BSplineParametrization2D::node_id_to_t_
private

◆ node_ids_

std::vector<int> polyfem::BSplineParametrization2D::node_ids_
private

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