FEAT 3
Finite Element Analysis Toolbox
Loading...
Searching...
No Matches
FEAT::Analytic::PolarCoordinate< Function_, pos_range_ > Class Template Reference

This class is a wrapper transforming a polar-basis function to a euclidean base one. More...

#include <wrappers.hpp>

Inheritance diagram for FEAT::Analytic::PolarCoordinate< Function_, pos_range_ >:
FEAT::Analytic::Function

Classes

class  Evaluator
 

Public Types

typedef Function_::DataType DataType
 
typedef Function_::ImageType ImageType
 this is a vector-valued function More...
 

Public Member Functions

 PolarCoordinate (const Function_ &func)
 
 PolarCoordinate (const Function_ &func, DataType theta)
 
 PolarCoordinate (const Function_ &func, Tiny::Vector< DataType, 2 > shift, DataType theta=DataType(0))
 theta rot angle, so that x' = rot(theta) * x More...
 
 PolarCoordinate (const Function_ &func, Tiny::Vector< DataType, 2 > shift, Tiny::Vector< DataType, 2 > x_base)
 provide shift vector and the first x' basis vector More...
 

Public Attributes

Tiny::Matrix< DataType, 2, 2 > _rotation
 
Tiny::Vector< DataType, 2 > _shift
 

Static Public Attributes

static constexpr bool can_grad = Function_::can_grad
 
static constexpr bool can_hess = Function_::can_hess
 
static constexpr bool can_value = Function_::can_value
 
static constexpr int domain_dim = Function_::domain_dim
 our domain dimension is the same as the input function's More...
 
static constexpr bool pos_range = pos_range_
 

Private Attributes

const Function_ & _function
 

Detailed Description

template<typename Function_, bool pos_range_ = true>
class FEAT::Analytic::PolarCoordinate< Function_, pos_range_ >

This class is a wrapper transforming a polar-basis function to a euclidean base one.

Template Parameters
Function_The function object to wrap
pos_rangeShould we use angles in \( [0, 2\pi] \) ?

This wrapper handles the transformation of a 2D function defined in (shifted and rotated) polar coordinates, i.e. function defined simply in \( (r,\varphi) \) to the standard euclidean basis \( x,y \), where the polar coordinates can be expressed by a orthogonally transformed euclidean basis \((e_x', e_y')\) with \( x' = r \cos(\varphi), y' = r \sin(\varphi) \). To be more precisly: This Wrapper expresses values, gradients and hessians (if available) in the standard euclidean basis e_x, e_y while the actual function can be defined in an arbitrarly rotated and shifted polar-coordinate space. For the affin-linear transformation fa(x) = f(Ax+c), we simply use the chain rule and arrive at grad fa(x) = A^T grad f(z), hess fa(x) = A^T hess f(z) A, where z = Ax+c. The influence of the change to curveilinear coordinates, that is hidden inside of f is a bit more complicated but can be arrived at using the simple connection of \( du/dx = \frac{\partial u}{\partial r} \frac{\partial r}{\partial x} + \frac{\partial u}{\partial \varphi} \frac{\partial \varphi}{\partial x} \) .

Author
Maximilian Esser

Definition at line 432 of file wrappers.hpp.

Member Typedef Documentation

◆ DataType

template<typename Function_ , bool pos_range_ = true>
typedef Function_::DataType FEAT::Analytic::PolarCoordinate< Function_, pos_range_ >::DataType

Definition at line 447 of file wrappers.hpp.

◆ ImageType

template<typename Function_ , bool pos_range_ = true>
typedef Function_::ImageType FEAT::Analytic::PolarCoordinate< Function_, pos_range_ >::ImageType

this is a vector-valued function

Definition at line 446 of file wrappers.hpp.

Constructor & Destructor Documentation

◆ PolarCoordinate() [1/4]

template<typename Function_ , bool pos_range_ = true>
FEAT::Analytic::PolarCoordinate< Function_, pos_range_ >::PolarCoordinate ( const Function_ &  func)
inline

Definition at line 457 of file wrappers.hpp.

◆ PolarCoordinate() [2/4]

template<typename Function_ , bool pos_range_ = true>
FEAT::Analytic::PolarCoordinate< Function_, pos_range_ >::PolarCoordinate ( const Function_ &  func,
DataType  theta 
)
inline

theta rot angle, so that x' = rot(theta) * (x - shift) in case you actually want to rotate the coordinate system, keep in mind, that this is done by using -theta...

Definition at line 468 of file wrappers.hpp.

References FEAT::Tiny::Matrix< T_, m_, n_, sm_, sn_ >::set_rotation_2d().

◆ PolarCoordinate() [3/4]

template<typename Function_ , bool pos_range_ = true>
FEAT::Analytic::PolarCoordinate< Function_, pos_range_ >::PolarCoordinate ( const Function_ &  func,
Tiny::Vector< DataType, 2 >  shift,
DataType  theta = DataType(0) 
)
inline

theta rot angle, so that x' = rot(theta) * x

Definition at line 477 of file wrappers.hpp.

References FEAT::Tiny::Matrix< T_, m_, n_, sm_, sn_ >::set_rotation_2d().

◆ PolarCoordinate() [4/4]

template<typename Function_ , bool pos_range_ = true>
FEAT::Analytic::PolarCoordinate< Function_, pos_range_ >::PolarCoordinate ( const Function_ &  func,
Tiny::Vector< DataType, 2 >  shift,
Tiny::Vector< DataType, 2 >  x_base 
)
inline

provide shift vector and the first x' basis vector

Definition at line 486 of file wrappers.hpp.

References FEAT::Math::calc_opening_angle(), and FEAT::Tiny::Matrix< T_, m_, n_, sm_, sn_ >::set_rotation_2d().

Member Data Documentation

◆ _function

template<typename Function_ , bool pos_range_ = true>
const Function_& FEAT::Analytic::PolarCoordinate< Function_, pos_range_ >::_function
private

Definition at line 598 of file wrappers.hpp.

◆ _rotation

template<typename Function_ , bool pos_range_ = true>
Tiny::Matrix<DataType, 2, 2> FEAT::Analytic::PolarCoordinate< Function_, pos_range_ >::_rotation

Definition at line 454 of file wrappers.hpp.

◆ _shift

template<typename Function_ , bool pos_range_ = true>
Tiny::Vector<DataType, 2> FEAT::Analytic::PolarCoordinate< Function_, pos_range_ >::_shift

Definition at line 455 of file wrappers.hpp.

◆ can_grad

template<typename Function_ , bool pos_range_ = true>
constexpr bool FEAT::Analytic::PolarCoordinate< Function_, pos_range_ >::can_grad = Function_::can_grad
staticconstexpr

Definition at line 450 of file wrappers.hpp.

◆ can_hess

template<typename Function_ , bool pos_range_ = true>
constexpr bool FEAT::Analytic::PolarCoordinate< Function_, pos_range_ >::can_hess = Function_::can_hess
staticconstexpr

Definition at line 451 of file wrappers.hpp.

◆ can_value

template<typename Function_ , bool pos_range_ = true>
constexpr bool FEAT::Analytic::PolarCoordinate< Function_, pos_range_ >::can_value = Function_::can_value
staticconstexpr

Definition at line 449 of file wrappers.hpp.

◆ domain_dim

template<typename Function_ , bool pos_range_ = true>
constexpr int FEAT::Analytic::PolarCoordinate< Function_, pos_range_ >::domain_dim = Function_::domain_dim
staticconstexpr

our domain dimension is the same as the input function's

Definition at line 440 of file wrappers.hpp.

◆ pos_range

template<typename Function_ , bool pos_range_ = true>
constexpr bool FEAT::Analytic::PolarCoordinate< Function_, pos_range_ >::pos_range = pos_range_
staticconstexpr

Definition at line 441 of file wrappers.hpp.


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