Finite Volume Solver  prototype
A framework to build finite volume solvers for the AG Klein at the Freie Universität Berlin.
Public Member Functions | Private Attributes | List of all members
fub::PolymorphicGeometry< Rank > Class Template Reference

#include <PolymorphicGeometry.hpp>

Public Member Functions

 PolymorphicGeometry (const PolymorphicGeometry &other)
 
template<typename G , std::enable_if_t<!std::is_base_of< Geometry< Rank >, G >::value > * = nullptr, std::enable_if_t<!std::is_same< G, PolymorphicGeometry >::value > * = nullptr>
 PolymorphicGeometry (const G &geometry)
 
template<typename G , std::enable_if_t< std::is_base_of< Geometry< Rank >, G >::value > * = nullptr, std::enable_if_t<!std::is_same< G, PolymorphicGeometry >::value > * = nullptr>
 PolymorphicGeometry (const G &geometry)
 
double ComputeDistanceTo (const std::array< double, Rank > &x) const override
 Computes the minimum distance between geometry and point x. More...
 
std::unique_ptr< Geometry< Rank > > Clone () const override
 Returns a copy of the concrete geometry as a pointer to the base class. More...
 
Geometry< Rank > & Base () noexcept
 
const Geometry< Rank > & Base () const noexcept
 

Private Attributes

std::unique_ptr< Geometry< Rank > > base_
 

Constructor & Destructor Documentation

◆ PolymorphicGeometry() [1/3]

template<std::size_t Rank>
fub::PolymorphicGeometry< Rank >::PolymorphicGeometry ( const PolymorphicGeometry< Rank > &  other)
inline

◆ PolymorphicGeometry() [2/3]

template<std::size_t Rank>
template<typename G , std::enable_if_t<!std::is_base_of< Geometry< Rank >, G >::value > * = nullptr, std::enable_if_t<!std::is_same< G, PolymorphicGeometry >::value > * = nullptr>
fub::PolymorphicGeometry< Rank >::PolymorphicGeometry ( const G &  geometry)
inline

◆ PolymorphicGeometry() [3/3]

template<std::size_t Rank>
template<typename G , std::enable_if_t< std::is_base_of< Geometry< Rank >, G >::value > * = nullptr, std::enable_if_t<!std::is_same< G, PolymorphicGeometry >::value > * = nullptr>
fub::PolymorphicGeometry< Rank >::PolymorphicGeometry ( const G &  geometry)
inline

Member Function Documentation

◆ Base() [1/2]

template<std::size_t Rank>
const Geometry<Rank>& fub::PolymorphicGeometry< Rank >::Base ( ) const
inlinenoexcept

◆ Base() [2/2]

template<std::size_t Rank>
Geometry<Rank>& fub::PolymorphicGeometry< Rank >::Base ( )
inlinenoexcept

◆ Clone()

template<std::size_t Rank>
std::unique_ptr<Geometry<Rank> > fub::PolymorphicGeometry< Rank >::Clone ( ) const
inlineoverridevirtual

Returns a copy of the concrete geometry as a pointer to the base class.

Implements fub::Geometry< Rank >.

◆ ComputeDistanceTo()

template<std::size_t Rank>
double fub::PolymorphicGeometry< Rank >::ComputeDistanceTo ( const std::array< double, Rank > &  x) const
inlineoverridevirtual

Computes the minimum distance between geometry and point x.

Implements fub::Geometry< Rank >.

Member Data Documentation

◆ base_

template<std::size_t Rank>
std::unique_ptr<Geometry<Rank> > fub::PolymorphicGeometry< Rank >::base_
private

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