QUGaR 0.0.4
Loading...
Searching...
No Matches
qugar::impl::funcs::CylinderBzr Class Reference

Infinite cylinder. More...

#include <primitive_funcs_lib.hpp>

Inheritance diagram for qugar::impl::funcs::CylinderBzr:
[legend]
Collaboration diagram for qugar::impl::funcs::CylinderBzr:
[legend]

Public Member Functions

 CylinderBzr (real radius)
 Constructor.
 
 CylinderBzr (real radius, const Point< 3 > &origin)
 Constructor.
 
 CylinderBzr (real radius, const Point< 3 > &origin, const Point< 3 > &axis)
 Constructor.
 
- Public Member Functions inherited from qugar::impl::funcs::CylinderBase
 CylinderBase (real radius, const Point< 3 > &origin, const Point< 3 > &axis)
 Constructor.
 
real radius () const
 Gets the radius of the cylinder.
 
const Point< 3 > & origin () const
 Gets the origin of the cylinder.
 
const Point< 3 > & axis () const
 Gets the axis of the cylinder.
 
- Public Member Functions inherited from qugar::impl::BezierTP< 3, 1 >
 BezierTP (const TensorSizeTP< dim > &order)
 Constructor.
 
 BezierTP (const TensorSizeTP< dim > &order, const CoefsType &value)
 Constructs a constant value Bezier tensor product.
 
 BezierTP (const TensorSizeTP< dim > &order, const std::vector< CoefsType > &coefs)
 Constructor.
 
 BezierTP (const BezierTP< dim, range > &bezier)
 Copy constructor.
 
 BezierTP (const MonomialsTP< dim, range > &monomials)
 Constructor.
 
virtual Value< realoperator() (const Point< dim > &point) const final
 Evaluator operator.
 
virtual Value< Interval< dim > > operator() (const Point< dim, Interval< dim > > &point) const final
 Evaluator operator.
 
virtual Gradient< realgrad (const Point< dim > &point) const final
 Gradient evaluator operator.
 
virtual Gradient< Interval< dim > > grad (const Point< dim, Interval< dim > > &point) const final
 Gradient evaluator operator.
 
virtual Hessian< realhessian (const Point< dim > &point) const final
 Hessian evaluator operator.
 
const ::algoim::xarray< CoefsType, dim > & get_xarray () const
 Gets a constant reference to the stored xarray view of the polynomial coefficients.
 
std::shared_ptr< BezierTP< dim - 1, range > > extract_facet (const int local_facet_id) const
 
std::shared_ptr< BezierTP< dim, range > > raise_order (const TensorSizeTP< dim > &new_order) const
 Raises the order of the Bezier tensor product.
 
std::shared_ptr< BezierTP< dim, range > > negate () const
 Creates a new Bezier tensor product (TP) object that is the negation of the current object.
 
void rescale_domain (const BoundBox< dim > &new_domain)
 Recomputes (in-place) the Bezier coefficients for a new domain (that may not be [0, 1]).
 
FuncSign sign () const
 Returns the sign of the function represented by the Bézier tensor-product using the properties of the control points convex hull.
 
std::shared_ptr< BezierTP< dim, range > > operator* (const BezierTP< dim, range > &rhs) const
 Product of two Beziers.
 
std::shared_ptr< BezierTP< dim, range > > operator+ (const BezierTP< dim, range > &rhs) const
 Addition of two Beziers.
 
std::shared_ptr< BezierTP< dim, range > > operator- (const BezierTP< dim, range > &rhs) const
 Subtraction of two Beziers.
 
std::shared_ptr< BezierTP< sub_dim, range > > compose (const BezierTP< sub_dim, dim > &rhs) const
 Composes the current Bezier with the given Bezier rhs.
 
- Public Member Functions inherited from qugar::impl::PolynomialTP< dim, range >
 PolynomialTP (const TensorSizeTP< dim > &order)
 Constructor.
 
 PolynomialTP (const TensorSizeTP< dim > &order, const CoefsType &value)
 Constructs a constant value PolynomialTP object with the specified order.
 
 PolynomialTP (const TensorSizeTP< dim > &order, const std::vector< CoefsType > &coefs)
 Constructor.
 
std::size_t get_num_coefs () const
 Get the number of coeficients.
 
const std::vector< CoefsType > & get_coefs () const
 Gets the polynomial coefficients.
 
const TensorSizeTP< dim > & get_order () const
 Gets the polynomial order along the parametric directions.
 
int get_order (int dir) const
 Gets the polynomial order (degree + 1) along the direction dir.
 
const CoefsTypeget_coef (int index) const
 Retrieves the coefficients at the specified index.
 
CoefsTypeget_coef (int index)
 Retrieves the coefficients at the specified index.
 
const CoefsTypeget_coef (const TensorIndexTP< dim > &index) const
 Retrieves the coefficient associated with the given tensor index.
 
CoefsTypeget_coef (const TensorIndexTP< dim > &index)
 Retrieves the coefficient associated with the given tensor index.
 
int get_degree (int dir) const
 Gets the polynomial degree (order - 1) along the direction dir.
 
void transform_image (const BoundBox< range > &old_domain, const BoundBox< range > &new_domain)
 Transforms (in place) the coefficients of the polynomial from old_domain to new_domain.
 
void coefs_linear_transform (const real scale, const CoefsType &shift)
 Applies a linear transformation to every coefficient.
 
- Public Member Functions inherited from qugar::impl::DomainFunc< dim, range >
 DomainFunc ()=default
 Default constructor.
 
 DomainFunc (const DomainFunc &)=default
 Default copy constructor.
 
 DomainFunc (DomainFunc &&)=default
 Default move constructor.
 
DomainFuncoperator= (const DomainFunc &)=default
 Default copy assignment operator.
 
DomainFuncoperator= (DomainFunc &&)=default
 Default move assignment operator.
 
virtual ~DomainFunc ()=default
 Default virtual destructor.
 

Static Public Member Functions

static std::shared_ptr< MonomialsTP< 3, 1 > > create_monomials (real radius, const Point< 3 > &origin, const Point< 3 > &axis)
 Creates a polynomial representation based on monomials for the given center, radius, and axis.
 
- Static Public Member Functions inherited from qugar::impl::BezierTP< 3, 1 >
static Value< T > casteljau (const Point< dim, T > &point, typename std::vector< CoefsType >::const_iterator &coefs, const Vector< int, dim > &order)
 Evaluates a Bezier polynomial using the Casteljau's algorithm.
 
static Vector< Value< T >, dim+1 > casteljau_der (const Point< dim, T > &point, typename std::vector< CoefsType >::const_iterator &coefs, const Vector< int, dim > &order)
 Evaluates the gradient Bezier polynomial using the Casteljau's algorithm.
 

Additional Inherited Members

- Public Types inherited from qugar::impl::BezierTP< 3, 1 >
using Parent
 Parent type.
 
using CoefsType
 Coefs type.
 
using Value
 Value type.
 
using Gradient
 Gradient type.
 
using Hessian
 Hessian type.
 
using Interval
 Algoim's interval alias.
 
- Public Types inherited from qugar::impl::PolynomialTP< dim, range >
using CoefsType = std::conditional_t<range == 1, real, Point<range>>
 Coefs type.
 
- Public Types inherited from qugar::impl::DomainFunc< dim, range >
template<int N>
using Interval = ::algoim::Interval<N>
 Algoim's interval alias.
 
template<typename T >
using Value = std::conditional_t<range == 1, T, Vector<T, range>>
 Value type.
 
template<typename T >
using Gradient = Vector<Value<T>, dim>
 Gradient type.
 
template<typename T >
using Hessian = Vector<Value<T>, num_hessian>
 Hessian (symmetric type).
 
- Static Public Attributes inherited from qugar::impl::DomainFunc< dim, range >
static const int num_hessian = dim * (dim + 1) / 2
 Number of Hessian (symmetric) components.
 
- Static Protected Member Functions inherited from qugar::impl::funcs::CylinderBase
static Point< 3 > get_default_origin ()
 Gets the default origin of the cylinder. It is set to the origin of the Cartesian coordinate system.
 
static Point< 3 > get_default_axis ()
 Gets the default axis of the cylinder. It is set to the z-axis of the Cartesian coordinate system.
 
- Protected Attributes inherited from qugar::impl::funcs::CylinderBase
real radius_
 Radius of the cylinder.
 
Point< 3 > origin_
 Origin of the cylinder.
 
Point< 3 > axis_
 Axis of the axis.
 
- Protected Attributes inherited from qugar::impl::PolynomialTP< dim, range >
TensorSizeTP< dim > order_
 Order of the polynomial along each parametric direction.
 
std::vector< CoefsTypecoefs_
 

Detailed Description

Infinite cylinder.

The cylinder is defined by its radius, origin, and axis.

The function presents a negative sign around the cylinder's axis, and positive far away. At a radius distance from the cylinder's axis, the function vanishes.

Note
Bezier version.

Constructor & Destructor Documentation

◆ CylinderBzr() [1/3]

qugar::impl::funcs::CylinderBzr::CylinderBzr ( real radius)
explicit

Constructor.

Cylinder along z-axis.

Parameters
radiusCylinder's radius.

◆ CylinderBzr() [2/3]

qugar::impl::funcs::CylinderBzr::CylinderBzr ( real radius,
const Point< 3 > & origin )

Constructor.

Cylinder with vertical axis at the given origin.

Parameters
radiusCylinder's radius.
originCylinder's origin.

◆ CylinderBzr() [3/3]

qugar::impl::funcs::CylinderBzr::CylinderBzr ( real radius,
const Point< 3 > & origin,
const Point< 3 > & axis )

Constructor.

Parameters
radiusCylinder's radius.
originCylinder's origin.
axisCylinder's axis.

Member Function Documentation

◆ create_monomials()

static std::shared_ptr< MonomialsTP< 3, 1 > > qugar::impl::funcs::CylinderBzr::create_monomials ( real radius,
const Point< 3 > & origin,
const Point< 3 > & axis )
staticnodiscard

Creates a polynomial representation based on monomials for the given center, radius, and axis.

Parameters
radiusThe radius of the cylinder.
originThe center of the cylinder.
axisThe radius of the cylinder.

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