QUGaR 0.0.4
Loading...
Searching...
No Matches
qugar::impl::funcs::Sphere< dim > Class Template Reference

Dimension independent spherical function. The function is defined by its center and radius. The function presents a negative sign around the center, and positive far away. At a radius distance from the center, the function vanishes. More...

#include <primitive_funcs_lib.hpp>

Inheritance diagram for qugar::impl::funcs::Sphere< dim >:
[legend]
Collaboration diagram for qugar::impl::funcs::Sphere< dim >:
[legend]

Public Member Functions

 Sphere (real radius)
 Constructs a Sphere with the given radius and centered at the origin.
 
 Sphere (real radius, const Point< dim > &center)
 Constructs a Sphere object with a specified center and radius.
 
- Public Member Functions inherited from qugar::impl::funcs::SphereBase< dim >
 SphereBase (real radius, const Point< dim > &center)
 Constructs a Sphere object with a specified center and radius.
 
real radius () const
 Gets the radius of the sphere.
 
const Point< dim > & center () const
 Gets the center of the sphere.
 
- 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.
 
virtual Value< realoperator() (const Point< dim > &point) const =0
 Evaluator operator.
 
virtual Value< Interval< dim > > operator() (const Point< dim, Interval< dim > > &point) const =0
 Evaluator operator.
 
virtual Gradient< realgrad (const Point< dim > &point) const =0
 Gradient evaluator operator.
 
virtual Gradient< Interval< dim > > grad (const Point< dim, Interval< dim > > &point) const =0
 Gradient evaluator operator.
 
virtual Hessian< realhessian (const Point< dim > &point) const =0
 Hessian evaluator operator.
 

Public Attributes

 declare_impl_func_virtual_interface
 

Additional Inherited Members

- 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::SphereBase< dim >
static Point< dim > get_default_center ()
 Gets the default center of the sphere. It is set to the origin of the Cartesian coordinate system.
 
- Protected Attributes inherited from qugar::impl::funcs::SphereBase< dim >
real radius_ { 0 }
 Radius of the sphere.
 
Point< dim > center_
 Center of the sphere.
 

Detailed Description

template<int dim>
class qugar::impl::funcs::Sphere< dim >

Dimension independent spherical function. The function is defined by its center and radius. The function presents a negative sign around the center, and positive far away. At a radius distance from the center, the function vanishes.

Note
Non-Bezier version.
Template Parameters
dimParametric dimension.

Constructor & Destructor Documentation

◆ Sphere() [1/2]

template<int dim>
qugar::impl::funcs::Sphere< dim >::Sphere ( real radius)
explicit

Constructs a Sphere with the given radius and centered at the origin.

Parameters
radiusThe radius of the sphere.

◆ Sphere() [2/2]

template<int dim>
qugar::impl::funcs::Sphere< dim >::Sphere ( real radius,
const Point< dim > & center )

Constructs a Sphere object with a specified center and radius.

Parameters
radiusThe radius of the sphere.
centerThe center of the sphere.

Member Data Documentation

◆ declare_impl_func_virtual_interface

template<int dim>
qugar::impl::funcs::Sphere< dim >::declare_impl_func_virtual_interface

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