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

#include <CubicHermiteSplineParametrization.hpp>

Public Member Functions

 CubicHermiteSplineParametrization (const std::map< int, Eigen::MatrixXd > &control_point, const std::map< int, Eigen::MatrixXd > &tangent, const std::map< int, std::vector< int > > &boundary_id_to_node_id, const Eigen::MatrixXd &V, const int sampling)
 
void reparametrize (const std::map< int, Eigen::MatrixXd > &control_point, const std::map< int, Eigen::MatrixXd > &tangent, const Eigen::MatrixXd &V, Eigen::MatrixXd &newV) const
 
void get_parameters (const Eigen::MatrixXd &V, std::map< int, Eigen::MatrixXd > &control_point, std::map< int, Eigen::MatrixXd > &tangent) const
 
void derivative_wrt_params (const Eigen::VectorXd &grad_boundary, const int boundary_id, const int couple_tangents, Eigen::VectorXd &grad_control_point, Eigen::VectorXd &grad_tangent) const
 

Static Public Member Functions

static void find_nearest_spline (const Eigen::MatrixXd &point, const Eigen::MatrixXd &control_point, const Eigen::MatrixXd &tangent, int &nearest, double &t_optimal, double &distance, double &distance_to_start, double &distance_to_end, const double tol=1e-4)
 
static void gradient (const Eigen::MatrixXd &point, const Eigen::MatrixXd &control_point, const Eigen::MatrixXd &tangent, const int spline, const double t_parameter, const double distance, Eigen::MatrixXd &grad)
 
static void eval (const Eigen::MatrixXd &control_point, const Eigen::MatrixXd &tangent, const double t, Eigen::MatrixXd &val)
 
static void deriv (const Eigen::MatrixXd &control_point, const Eigen::MatrixXd &tangent, const double t, Eigen::MatrixXd &val)
 
static void second_deriv (const Eigen::MatrixXd &control_point, const Eigen::MatrixXd &tangent, const double t, Eigen::MatrixXd &val)
 

Private Attributes

std::map< int, std::vector< int > > boundary_id_to_node_id_
 
std::map< int, double > node_id_to_t_
 
std::map< int, int > node_id_to_spline_
 
int dim = 2
 
std::map< int, int > boundary_id_to_spline_count_
 

Detailed Description

Definition at line 13 of file CubicHermiteSplineParametrization.hpp.

Constructor & Destructor Documentation

◆ CubicHermiteSplineParametrization()

polyfem::CubicHermiteSplineParametrization::CubicHermiteSplineParametrization ( const std::map< int, Eigen::MatrixXd > &  control_point,
const std::map< int, Eigen::MatrixXd > &  tangent,
const std::map< int, std::vector< int > > &  boundary_id_to_node_id,
const Eigen::MatrixXd &  V,
const int  sampling 
)
inline

Definition at line 16 of file CubicHermiteSplineParametrization.hpp.

References boundary_id_to_node_id_, boundary_id_to_spline_count_, dim, find_nearest_spline(), polyfem::logger(), node_id_to_spline_, node_id_to_t_, and V.

Here is the call graph for this function:

Member Function Documentation

◆ deriv()

static void polyfem::CubicHermiteSplineParametrization::deriv ( const Eigen::MatrixXd &  control_point,
const Eigen::MatrixXd &  tangent,
const double  t,
Eigen::MatrixXd &  val 
)
inlinestatic

Definition at line 257 of file CubicHermiteSplineParametrization.hpp.

References val.

Referenced by find_nearest_spline().

Here is the caller graph for this function:

◆ derivative_wrt_params()

void polyfem::CubicHermiteSplineParametrization::derivative_wrt_params ( const Eigen::VectorXd &  grad_boundary,
const int  boundary_id,
const int  couple_tangents,
Eigen::VectorXd &  grad_control_point,
Eigen::VectorXd &  grad_tangent 
) const
inline

◆ eval()

static void polyfem::CubicHermiteSplineParametrization::eval ( const Eigen::MatrixXd &  control_point,
const Eigen::MatrixXd &  tangent,
const double  t,
Eigen::MatrixXd &  val 
)
inlinestatic

Definition at line 247 of file CubicHermiteSplineParametrization.hpp.

References val.

Referenced by find_nearest_spline(), gradient(), and reparametrize().

Here is the caller graph for this function:

◆ find_nearest_spline()

static void polyfem::CubicHermiteSplineParametrization::find_nearest_spline ( const Eigen::MatrixXd &  point,
const Eigen::MatrixXd &  control_point,
const Eigen::MatrixXd &  tangent,
int &  nearest,
double &  t_optimal,
double &  distance,
double &  distance_to_start,
double &  distance_to_end,
const double  tol = 1e-4 
)
inlinestatic

Definition at line 153 of file CubicHermiteSplineParametrization.hpp.

References deriv(), dim, eval(), second_deriv(), and val.

Referenced by CubicHermiteSplineParametrization().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_parameters()

void polyfem::CubicHermiteSplineParametrization::get_parameters ( const Eigen::MatrixXd &  V,
std::map< int, Eigen::MatrixXd > &  control_point,
std::map< int, Eigen::MatrixXd > &  tangent 
) const
inline

◆ gradient()

static void polyfem::CubicHermiteSplineParametrization::gradient ( const Eigen::MatrixXd &  point,
const Eigen::MatrixXd &  control_point,
const Eigen::MatrixXd &  tangent,
const int  spline,
const double  t_parameter,
const double  distance,
Eigen::MatrixXd &  grad 
)
inlinestatic

Definition at line 233 of file CubicHermiteSplineParametrization.hpp.

References dim, eval(), and val.

Here is the call graph for this function:

◆ reparametrize()

void polyfem::CubicHermiteSplineParametrization::reparametrize ( const std::map< int, Eigen::MatrixXd > &  control_point,
const std::map< int, Eigen::MatrixXd > &  tangent,
const Eigen::MatrixXd &  V,
Eigen::MatrixXd &  newV 
) const
inline

Definition at line 57 of file CubicHermiteSplineParametrization.hpp.

References boundary_id_to_node_id_, dim, eval(), node_id_to_spline_, node_id_to_t_, and V.

Here is the call graph for this function:

◆ second_deriv()

static void polyfem::CubicHermiteSplineParametrization::second_deriv ( const Eigen::MatrixXd &  control_point,
const Eigen::MatrixXd &  tangent,
const double  t,
Eigen::MatrixXd &  val 
)
inlinestatic

Definition at line 266 of file CubicHermiteSplineParametrization.hpp.

References val.

Referenced by find_nearest_spline().

Here is the caller graph for this function:

Member Data Documentation

◆ boundary_id_to_node_id_

std::map<int, std::vector<int> > polyfem::CubicHermiteSplineParametrization::boundary_id_to_node_id_
private

◆ boundary_id_to_spline_count_

std::map<int, int> polyfem::CubicHermiteSplineParametrization::boundary_id_to_spline_count_
private

◆ dim

int polyfem::CubicHermiteSplineParametrization::dim = 2
private

◆ node_id_to_spline_

std::map<int, int> polyfem::CubicHermiteSplineParametrization::node_id_to_spline_
private

◆ node_id_to_t_

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

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